Class PlainNumberVariableValueArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Long>
rocks.gravili.notquests.paper.commands.arguments.variables.PlainNumberVariableValueArgument<C>
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<Long>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class PlainNumberVariableValueArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,Long>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionlonggetMax()Get the maximum accepted Long that could have been parsedlonggetMin()Get the minimum accepted Long that could have been parsedstatic <C> @NonNull PlainNumberVariableValueArgument.Builder<C>newBuilder(@NonNull String name, NotQuests main) Create a newPlainNumberVariableValueArgument.Builder.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Long> Create a new requiredPlainNumberVariableValueArgument.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Long> Create a new requiredPlainNumberVariableValueArgumentwith the specified default value.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Long> Create a new optionalPlainNumberVariableValueArgument.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 PlainNumberVariableValueArgument.Builder<C> newBuilder(@NonNull String name, NotQuests main) Create a newPlainNumberVariableValueArgument.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,Long> of(@NonNull String name, NotQuests main) Create a new requiredPlainNumberVariableValueArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Long> optional(@NonNull String name, NotQuests main) Create a new optionalPlainNumberVariableValueArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Long> optional(@NonNull String name, long defaultNum, NotQuests main) Create a new requiredPlainNumberVariableValueArgumentwith the specified default value.- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultNum- Default value- Returns:
- Created argument
-
getMin
public long getMin()Get the minimum accepted Long that could have been parsed- Returns:
- Minimum Long
-
getMax
public long getMax()Get the maximum accepted Long that could have been parsed- Returns:
- Maximum Long
-