Class FloatArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Float>
cloud.commandframework.arguments.standard.FloatArgument<C>
- All Implemented Interfaces:
CloudKeyHolder<Float>,Comparable<CommandArgument<?,?>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic 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 TypeMethodDescriptionfloatgetMax()Get the maximum accepted float that could have been parsedfloatgetMin()Get the minimum accepted float that could have been parsedstatic <C> @NonNull FloatArgument.Builder<C>newBuilder(@NonNull String name) Create a newFloatArgument.Builder.static <C> @NonNull CommandArgument<C,Float> Create a new requiredFloatArgument.static <C> @NonNull CommandArgument<C,Float> Create a new optionalFloatArgument.static <C> @NonNull CommandArgument<C,Float> Create a new optionalFloatArgumentwith the specified default value.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
Create a newFloatArgument.Builder.- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
Create a new requiredFloatArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
Create a new optionalFloatArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull CommandArgument<C,Float> optional(@NonNull String name, float defaultNum) Create a new optionalFloatArgumentwith the specified default value.- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultNum- Default num- Returns:
- Created argument
-
getMin
public float getMin()Get the minimum accepted float that could have been parsed- Returns:
- Minimum float
-
getMax
public float getMax()Get the maximum accepted float that could have been parsed- Returns:
- Maximum float
-