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 |
private static java.util.Collection<java.lang.String> |
EXAMPLES |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ONLY_PLAYERS_ALLOWED |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
PLAYER_NOT_FOUND |
private boolean |
playersOnly |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
SELECTOR_NOT_ALLOWED |
private boolean |
single |
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 EntityArgument |
entities() |
static EntityArgument |
entity() |
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) |
static Entity |
getEntity(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
java.util.Collection<java.lang.String> |
getExamples() |
static ServerPlayerEntity |
getPlayer(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static java.util.Collection<ServerPlayerEntity> |
getPlayers(com.mojang.brigadier.context.CommandContext<CommandSource> context,
java.lang.String name) |
static java.util.Collection<ServerPlayerEntity> |
getPlayersAllowingNone(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_) |
EntitySelector |
parse(com.mojang.brigadier.StringReader p_parse_1_) |
static EntityArgument |
player() |
static EntityArgument |
players() |
private static final java.util.Collection<java.lang.String> EXAMPLES
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
private final boolean single
private final boolean playersOnly
public static EntityArgument entity()
public static Entity getEntity(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 entities()
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<ServerPlayerEntity> 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 player()
public static ServerPlayerEntity getPlayer(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 players()
public static java.util.Collection<ServerPlayerEntity> 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>