Class BooleanArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Boolean>
cloud.commandframework.arguments.standard.BooleanArgument<C>
- All Implemented Interfaces:
CloudKeyHolder<Boolean>
,Comparable<CommandArgument<?,
?>>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Boolean parse exceptionstatic final class
static final class
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.TypedBuilder<C,
T, B extends CommandArgument.Builder<C, T>> -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the liberal booleanstatic <C> @NonNull BooleanArgument.Builder<C>
newBuilder
(@NonNull String name) Create a new builderstatic <C> @NonNull CommandArgument<C,
Boolean> Create a new required command argumentstatic <C> @NonNull CommandArgument<C,
Boolean> Create a new optional command argumentstatic <C> @NonNull CommandArgument<C,
Boolean> Create a new required command argument with a default valueMethods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Method Details
-
newBuilder
Create a new builder- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
-
of
Create a new required command argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
Create a new optional command argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull CommandArgument<C,Boolean> optional(@NonNull String name, boolean defaultBoolean) Create a new required command argument with a default value- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namedefaultBoolean
- Default num- Returns:
- Created argument
-
isLiberal
public boolean isLiberal()Get the liberal boolean- Returns:
- Liberal boolean
-