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