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 intstatic final intstatic final intstatic final intstatic final intFields inherited from class Argument
allowSpace, suggestionType, useRemaining -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbyte @Nullable []onlyPlayers(boolean onlyPlayers) parse(CommandSender sender, String input) Parses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toTparser()singleEntity(boolean singleEntity) static EntityFinderstaticParse(CommandSender sender, String input, boolean onlySingleEntity, boolean onlyPlayers) Deprecated.toString()Methods inherited from class 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:ArgumentParses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toT- Specified by:
parsein classArgument<EntityFinder>- Parameters:
input- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException- ifvalueis not valid
-
parser
- Specified by:
parserin classArgument<EntityFinder>
-
nodeProperties
- Overrides:
nodePropertiesin 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)