Package net.minecraft.commands.arguments
Class EntityArgument
java.lang.Object
net.minecraft.commands.arguments.EntityArgument
- All Implemented Interfaces:
- com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
public class EntityArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final Collection<String>static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionType(package private) final boolean(package private) final boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic EntityArgumententities()static EntityArgumententity()static Collection<? extends Entity>getEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91462_, String p_91463_) static EntitygetEntity(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91453_, String p_91454_) static Collection<? extends Entity>getOptionalEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91468_, String p_91469_) static Collection<ServerPlayer>getOptionalPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91472_, String p_91473_) static ServerPlayergetPlayer(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91475_, String p_91476_) static Collection<ServerPlayer>getPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91478_, String p_91479_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_91482_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_91483_) parse(com.mojang.brigadier.StringReader p_91451_) static EntityArgumentplayer()static EntityArgumentplayers()
- 
Field Details- 
EXAMPLES
- 
ERROR_NOT_SINGLE_ENTITYpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_SINGLE_ENTITY
- 
ERROR_NOT_SINGLE_PLAYERpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_SINGLE_PLAYER
- 
ERROR_ONLY_PLAYERS_ALLOWEDpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_ONLY_PLAYERS_ALLOWED
- 
NO_ENTITIES_FOUNDpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_ENTITIES_FOUND
- 
NO_PLAYERS_FOUNDpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_PLAYERS_FOUND
- 
ERROR_SELECTORS_NOT_ALLOWEDpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SELECTORS_NOT_ALLOWED
- 
singlefinal boolean single
- 
playersOnlyfinal boolean playersOnly
 
- 
- 
Constructor Details- 
EntityArgumentprotected EntityArgument(boolean p_91447_, boolean p_91448_) 
 
- 
- 
Method Details- 
entity
- 
getEntitypublic static Entity getEntity(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91453_, String p_91454_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
entities
- 
getEntitiespublic static Collection<? extends Entity> getEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91462_, String p_91463_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getOptionalEntitiespublic static Collection<? extends Entity> getOptionalEntities(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91468_, String p_91469_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getOptionalPlayerspublic static Collection<ServerPlayer> getOptionalPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91472_, String p_91473_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
player
- 
getPlayerpublic static ServerPlayer getPlayer(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91475_, String p_91476_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
players
- 
getPlayerspublic static Collection<ServerPlayer> getPlayers(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_91478_, String p_91479_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
parsepublic EntitySelector parse(com.mojang.brigadier.StringReader p_91451_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
- parsein interface- com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
listSuggestionspublic <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_91482_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_91483_) - Specified by:
- listSuggestionsin interface- com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
 
- 
getExamples- Specified by:
- getExamplesin interface- com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
 
 
-