public class EntityArgument extends java.lang.Object implements com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
Modifier and Type | Class and Description |
---|---|
static class |
EntityArgument.Serializer |
Modifier and Type | Field and Description |
---|---|
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ENTITY_NOT_FOUND |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ONLY_PLAYERS_ALLOWED |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
PLAYER_NOT_FOUND |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
SELECTOR_NOT_ALLOWED |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
TOO_MANY_ENTITIES |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
TOO_MANY_PLAYERS |
Modifier | Constructor and Description |
---|---|
protected |
EntityArgument(boolean singleIn,
boolean playersOnlyIn) |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<? extends Entity> |
getEntities(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static java.util.Collection<? extends Entity> |
getEntitiesAllowingNone(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
java.util.Collection<java.lang.String> |
getExamples() |
static EntityPlayerMP |
getOnePlayer(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static java.util.Collection<EntityPlayerMP> |
getPlayers(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static java.util.Collection<EntityPlayerMP> |
getPlayersAllowingNone(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static Entity |
getSingleEntity(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
<S> java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_listSuggestions_1_,
com.mojang.brigadier.suggestion.SuggestionsBuilder p_listSuggestions_2_) |
static EntityArgument |
multipleEntities() |
static EntityArgument |
multiplePlayers() |
EntitySelector |
parse(com.mojang.brigadier.StringReader p_parse_1_) |
static EntityArgument |
singleEntity() |
static EntityArgument |
singlePlayer() |
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TOO_MANY_ENTITIES
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TOO_MANY_PLAYERS
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ONLY_PLAYERS_ALLOWED
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ENTITY_NOT_FOUND
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType PLAYER_NOT_FOUND
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType SELECTOR_NOT_ALLOWED
public static EntityArgument singleEntity()
public static Entity getSingleEntity(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static EntityArgument multipleEntities()
public static java.util.Collection<? extends Entity> getEntities(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static java.util.Collection<? extends Entity> getEntitiesAllowingNone(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static java.util.Collection<EntityPlayerMP> getPlayersAllowingNone(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static EntityArgument singlePlayer()
public static EntityPlayerMP getOnePlayer(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static EntityArgument multiplePlayers()
public static java.util.Collection<EntityPlayerMP> getPlayers(com.mojang.brigadier.context.CommandContext<CommandSource> context, java.lang.String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public EntitySelector parse(com.mojang.brigadier.StringReader p_parse_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
parse
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
com.mojang.brigadier.exceptions.CommandSyntaxException
public <S> java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_listSuggestions_1_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_listSuggestions_2_)
listSuggestions
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
public java.util.Collection<java.lang.String> getExamples()
getExamples
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>