Class ArgumentEntity
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<EntityFinder>
net.minestom.server.command.builder.arguments.minecraft.ArgumentEntity
Represents the target selector argument.
https://minecraft.wiki/w/Target_selectors
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Fields inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, suggestionType, useRemaining
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
byte @Nullable []
onlyPlayers
(boolean onlyPlayers) @NotNull EntityFinder
parse
(@NotNull CommandSender sender, @NotNull String input) Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
parser()
singleEntity
(boolean singleEntity) static @NotNull EntityFinder
staticParse
(@NotNull CommandSender sender, @NotNull String input, boolean onlySingleEntity, boolean onlyPlayers) Deprecated.toString()
Methods inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, equals, filter, getCallback, getDefaultValue, getId, getSuggestionCallback, hasErrorCallback, hashCode, hasSuggestion, isOptional, map, map, parse, setCallback, setDefaultValue, setDefaultValue, setDefaultValue, setSuggestionCallback, suggestionType, useRemaining
-
Field Details
-
INVALID_SYNTAX
public static final int INVALID_SYNTAX- See Also:
-
ONLY_SINGLE_ENTITY_ERROR
public static final int ONLY_SINGLE_ENTITY_ERROR- See Also:
-
ONLY_PLAYERS_ERROR
public static final int ONLY_PLAYERS_ERROR- See Also:
-
INVALID_ARGUMENT_NAME
public static final int INVALID_ARGUMENT_NAME- See Also:
-
INVALID_ARGUMENT_VALUE
public static final int INVALID_ARGUMENT_VALUE- See Also:
-
-
Constructor Details
-
ArgumentEntity
-
-
Method Details
-
singleEntity
-
onlyPlayers
-
parse
@NotNull public @NotNull EntityFinder parse(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String input) throws ArgumentSyntaxException Description copied from class:Argument
Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
- Specified by:
parse
in classArgument<EntityFinder>
- Parameters:
input
- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException
- ifvalue
is not valid
-
parser
- Specified by:
parser
in classArgument<EntityFinder>
-
nodeProperties
public byte @Nullable [] nodeProperties()- Overrides:
nodeProperties
in classArgument<EntityFinder>
-
staticParse
@Deprecated @NotNull public static @NotNull EntityFinder staticParse(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String input, boolean onlySingleEntity, boolean onlyPlayers) throws ArgumentSyntaxException Deprecated.- Throws:
ArgumentSyntaxException
-
isOnlySingleEntity
public boolean isOnlySingleEntity() -
isOnlyPlayers
public boolean isOnlyPlayers() -
toString
-
Argument.parse(CommandSender, Argument)