Class BooleanArgument
java.lang.Object
org.core.command.argument.arguments.simple.BooleanArgument
- All Implemented Interfaces:
CommandArgument<Boolean>,ParseCommandArgument<Boolean>,SuggestCommandArgument<Boolean>
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanArgument(@NotNull String id)BooleanArgument(@NotNull String id, @NotNull String trueValue, @NotNull String falseValue) -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetId()Gets the ID of the command argument.parse(CommandContext context, CommandArgumentContext<Boolean> argument)suggest(CommandContext commandContext, CommandArgumentContext<Boolean> argument)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.core.command.argument.CommandArgument
getUsageMethods inherited from interface org.core.command.argument.SuggestCommandArgument
errorMessage
-
Constructor Details
-
BooleanArgument
-
BooleanArgument
-
-
Method Details
-
getId
Description copied from interface:CommandArgumentGets the ID of the command argument. A command argument id needs to be unique within the command, the ID is what separates the arguments. There isn't a standard message structure, however by default the id will be what shows in the usage- Specified by:
getIdin interfaceCommandArgument<Boolean>- Returns:
- a string Id
-
parse
public CommandArgumentResult<Boolean> parse(CommandContext context, CommandArgumentContext<Boolean> argument) throws IOException- Specified by:
parsein interfaceParseCommandArgument<Boolean>- Throws:
IOException
-
suggest
public Set<String> suggest(CommandContext commandContext, CommandArgumentContext<Boolean> argument)- Specified by:
suggestin interfaceSuggestCommandArgument<Boolean>
-