Class ShortArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,Short>
cloud.commandframework.arguments.standard.ShortArgument.Builder<C>
- Enclosing class:
- ShortArgument<C>
-
Method Summary
Modifier and TypeMethodDescription@NonNull ShortArgument.Builder<C>asOptionalWithDefault(short defaultValue) Sets the command argument to be optional, with the specified default value.@NonNull ShortArgument<C>build()Construct a command argument from the builder settings@NonNull ShortArgument.Builder<C>withMax(short max) Set a maximum value@NonNull ShortArgument.Builder<C>withMin(short 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:
-
build
Description copied from class:CommandArgument.BuilderConstruct a command argument from the builder settings- Overrides:
buildin classCommandArgument.Builder<C,Short> - Returns:
- Constructed argument
-