Class NumberVariableValueArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,String>
rocks.gravili.notquests.paper.commands.arguments.variables.NumberVariableValueArgument<C>
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<String>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class NumberVariableValueArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,String>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull NumberVariableValueArgument.Builder<C>
newBuilder
(@NonNull String name, NotQuests main, Variable<?> variable) Create a newNumberVariableValueArgument.Builder
.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
String> Create a new requiredNumberVariableValueArgument
.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
String> Create a new requiredNumberVariableValueArgument
with the specified default value.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
String> Create a new optionalNumberVariableValueArgument
.Methods 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
public static <C> @NonNull NumberVariableValueArgument.Builder<C> newBuilder(@NonNull String name, NotQuests main, Variable<?> variable) Create a newNumberVariableValueArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,String> of(@NonNull String name, NotQuests main, Variable<?> variable) Create a new requiredNumberVariableValueArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,String> optional(@NonNull String name, NotQuests main, Variable<?> variable) Create a new optionalNumberVariableValueArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,String> optional(@NonNull String name, int defaultNum, NotQuests main, Variable<?> variable) Create a new requiredNumberVariableValueArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namedefaultNum
- Default value- Returns:
- Created argument
-