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
Nested ClassesModifier and TypeClassDescriptionstatic final classBoolean parse exceptionstatic final classstatic final classNested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.TypedBuilder<C,T, B extends CommandArgument.Builder<C, T>> -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull BooleanArgument.Builder<C>Create a newBooleanArgument.Builder.booleanGet the liberal booleanstatic <C> @NonNull BooleanArgument.Builder<C>newBuilder(@NonNull String name) Deprecated.static <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
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull BooleanArgument.Builder<C> builder(@NonNull String name) Create a newBooleanArgument.Builder.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- new
BooleanArgument.Builder - Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull BooleanArgument.Builder<C> newBuilder(@NonNull String name) Deprecated.preferbuilder(String)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
-
builder(String)