Class FloatArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,Float>
cloud.commandframework.arguments.standard.FloatArgument.Builder<C>
- Enclosing class:
- FloatArgument<C>
-
Method Summary
Modifier and TypeMethodDescription@NonNull FloatArgument.Builder<C>
asOptionalWithDefault(float defaultValue)
Sets the command argument to be optional, with the specified default value.@NonNull FloatArgument<C>
build()
Construct a command argument from the builder settings@NonNull FloatArgument.Builder<C>
withMax(int max)
Set a maximum value@NonNull FloatArgument.Builder<C>
withMin(int min)
Set a minimum valueMethods inherited from class cloud.commandframework.arguments.CommandArgument.Builder
asOptional, asOptionalWithDefault, asRequired, getDefaultDescription, getDefaultValue, getName, getParser, getSuggestionsProvider, getValueType, isRequired, manager, withDefaultDescription, withParser, withSuggestionsProvider
-
Method Details
-
withMin
Set a minimum value- Parameters:
min
- Minimum value- Returns:
- Builder instance
-
withMax
Set a maximum value- Parameters:
max
- Maximum value- Returns:
- Builder instance
-
asOptionalWithDefault
Sets the command argument to be optional, with the specified default value.- Parameters:
defaultValue
- default value- Returns:
- this builder
- Since:
- 1.5.0
- See Also:
CommandArgument.Builder.asOptionalWithDefault(String)
-
build
Description copied from class:CommandArgument.Builder
Construct a command argument from the builder settings- Overrides:
build
in classCommandArgument.Builder<C,Float>
- Returns:
- Constructed argument
-