public class EntityArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
Modifier and Type | Class and Description |
---|---|
static class |
EntityArgumentType.Serializer |
Modifier and Type | Field and Description |
---|---|
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
ENTITY_NOT_FOUND_EXCEPTION |
private static Collection<String> |
EXAMPLES |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
NOT_ALLOWED_EXCEPTION |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
PLAYER_NOT_FOUND_EXCEPTION |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
PLAYER_SELECTOR_HAS_ENTITIES_EXCEPTION |
private boolean |
playersOnly |
private boolean |
singleTarget |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
TOO_MANY_ENTITIES_EXCEPTION |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
TOO_MANY_PLAYERS_EXCEPTION |
Modifier | Constructor and Description |
---|---|
protected |
EntityArgumentType(boolean singleTarget,
boolean playersOnly) |
Modifier and Type | Method and Description |
---|---|
static EntityArgumentType |
entities() |
static EntityArgumentType |
entity() |
static Collection<? extends Entity> |
getEntities(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
static Entity |
getEntity(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
Collection<String> |
getExamples() |
static Collection<? extends Entity> |
getOptionalEntities(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext,
String string) |
static Collection<ServerPlayerEntity> |
getOptionalPlayers(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext,
String string) |
static ServerPlayerEntity |
getPlayer(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext,
String string) |
static Collection<ServerPlayerEntity> |
getPlayers(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext,
String string) |
<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
listSuggestions(com.mojang.brigadier.context.CommandContext<S> context,
com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
EntitySelector |
parse(com.mojang.brigadier.StringReader stringReader) |
static EntityArgumentType |
player() |
static EntityArgumentType |
players() |
private static final Collection<String> EXAMPLES
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TOO_MANY_ENTITIES_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TOO_MANY_PLAYERS_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType PLAYER_SELECTOR_HAS_ENTITIES_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ENTITY_NOT_FOUND_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType PLAYER_NOT_FOUND_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NOT_ALLOWED_EXCEPTION
private final boolean singleTarget
private final boolean playersOnly
protected EntityArgumentType(boolean singleTarget, boolean playersOnly)
public static EntityArgumentType entity()
public static Entity getEntity(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
public static EntityArgumentType entities()
public static Collection<? extends Entity> getEntities(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
public static Collection<? extends Entity> getOptionalEntities(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
public static Collection<ServerPlayerEntity> getOptionalPlayers(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
public static EntityArgumentType player()
public static ServerPlayerEntity getPlayer(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
public static EntityArgumentType players()
public static Collection<ServerPlayerEntity> getPlayers(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
public EntitySelector parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
parse
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
com.mojang.brigadier.exceptions.CommandSyntaxException
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
listSuggestions
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>
public Collection<String> getExamples()
getExamples
in interface com.mojang.brigadier.arguments.ArgumentType<EntitySelector>