Module net.minestom.server
Class ArgumentCommand
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<CommandResult>
net.minestom.server.command.builder.arguments.ArgumentCommand
-
Field Summary
FieldsFields inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, suggestionType, useRemaining
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
parse
(CommandSender sender, String input) Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
parser()
setOnlyCorrect
(boolean onlyCorrect) setShortcut
(String shortcut) 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, nodeProperties, parse, setCallback, setDefaultValue, setDefaultValue, setDefaultValue, setSuggestionCallback, suggestionType, useRemaining
-
Field Details
-
INVALID_COMMAND_ERROR
public static final int INVALID_COMMAND_ERROR- See Also:
-
-
Constructor Details
-
ArgumentCommand
-
-
Method Details
-
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<CommandResult>
- Parameters:
input
- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException
- ifvalue
is not valid
-
parser
- Specified by:
parser
in classArgument<CommandResult>
-
isOnlyCorrect
public boolean isOnlyCorrect() -
setOnlyCorrect
-
getShortcut
-
setShortcut
-
toString
-