类 EntityArgument

java.lang.Object
net.minecraft.commands.arguments.EntityArgument
所有已实现的接口:
com.mojang.brigadier.arguments.ArgumentType<EntitySelector>

public class EntityArgument extends Object implements com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
  • 字段详细资料

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • ERROR_NOT_SINGLE_ENTITY

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_SINGLE_ENTITY
    • ERROR_NOT_SINGLE_PLAYER

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_SINGLE_PLAYER
    • ERROR_ONLY_PLAYERS_ALLOWED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_ONLY_PLAYERS_ALLOWED
    • NO_ENTITIES_FOUND

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_ENTITIES_FOUND
    • NO_PLAYERS_FOUND

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_PLAYERS_FOUND
    • ERROR_SELECTORS_NOT_ALLOWED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SELECTORS_NOT_ALLOWED
    • single

      final boolean single
    • playersOnly

      final boolean playersOnly
  • 构造器详细资料

    • EntityArgument

      protected EntityArgument(boolean pSingle, boolean pPlayersOnly)
  • 方法详细资料

    • entity

      public static EntityArgument entity()
    • getEntity

      public static Entity getEntity(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • entities

      public static EntityArgument entities()
    • getEntities

      public static Collection<? extends Entity> getEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getOptionalEntities

      public static Collection<? extends Entity> getOptionalEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getOptionalPlayers

      public static Collection<ServerPlayer> getOptionalPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • player

      public static EntityArgument player()
    • getPlayer

      public static ServerPlayer getPlayer(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • players

      public static EntityArgument players()
    • getPlayers

      public static Collection<ServerPlayer> getPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parse

      public EntitySelector parse(com.mojang.brigadier.StringReader pReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      指定者:
      parse 在接口中 com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
      抛出:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> pContext, com.mojang.brigadier.suggestion.SuggestionsBuilder pBuilder)
      指定者:
      listSuggestions 在接口中 com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
    • getExamples

      public Collection<String> getExamples()
      指定者:
      getExamples 在接口中 com.mojang.brigadier.arguments.ArgumentType<EntitySelector>