Module net.minestom.server
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
FieldsModifier 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
byte @Nullable []
onlyPlayers
(boolean onlyPlayers) parse
(CommandSender sender, String input) Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
parser()
singleEntity
(boolean singleEntity) static EntityFinder
staticParse
(CommandSender sender, 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
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 public static EntityFinder staticParse(CommandSender sender, String input, boolean onlySingleEntity, boolean onlyPlayers) throws ArgumentSyntaxException Deprecated.- Throws:
ArgumentSyntaxException
-
isOnlySingleEntity
public boolean isOnlySingleEntity() -
isOnlyPlayers
public boolean isOnlyPlayers() -
toString
-
Argument.parse(CommandSender, Argument)