Class IntegerArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,Integer>
cloud.commandframework.arguments.standard.IntegerArgument.Builder<C>
- Enclosing class:
- IntegerArgument<C>
@API(status=STABLE)
public static final class IntegerArgument.Builder<C>
extends CommandArgument.Builder<C,Integer>
-
Method Summary
Modifier and TypeMethodDescription@NonNull IntegerArgument.Builder<C>asOptionalWithDefault(int defaultValue) Sets the command argument to be optional, with the specified default value.@NonNull IntegerArgument<C>build()Construct a command argument from the builder settings@NonNull IntegerArgument.Builder<C>withMax(int max) Set a maximum value@NonNull IntegerArgument.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
@API(status=STABLE, since="1.5.0") public @NonNull IntegerArgument.Builder<C> asOptionalWithDefault(int defaultValue) 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:
-
build
Description copied from class:CommandArgument.BuilderConstruct a command argument from the builder settings- Overrides:
buildin classCommandArgument.Builder<C,Integer> - Returns:
- Constructed argument
-