Class CommandFlag.Builder<T>
java.lang.Object
cloud.commandframework.arguments.flags.CommandFlag.Builder<T>
- Enclosing class:
- CommandFlag<T>
-
Method Summary
Modifier and TypeMethodDescription@NonNull CommandFlag<T>
build()
Build a new command flag instancewithAliases(@NonNull String... aliases)
Create a new builder instance using the given flag aliases.<N> CommandFlag.Builder<N>
withArgument(@NonNull CommandArgument.Builder<?,N> builder)
Create a new builder instance using the given command argument<N> CommandFlag.Builder<N>
withArgument(@NonNull CommandArgument<?,N> argument)
Create a new builder instance using the given command argumentwithDescription(@NonNull ArgumentDescription description)
d Create a new builder instance using the given flag descriptionwithDescription(@NonNull Description description)
Deprecated.for removal since 1.4.0.
-
Method Details
-
withAliases
Create a new builder instance using the given flag aliases. These may at most be one character in length- Parameters:
aliases
- Flag aliases- Returns:
- New builder instance
-
withDescription
Deprecated.for removal since 1.4.0. UsewithDescription(ArgumentDescription)
instead.Create a new builder instance using the given flag description- Parameters:
description
- Flag description- Returns:
- New builder instance
-
withDescription
d Create a new builder instance using the given flag description- Parameters:
description
- Flag description- Returns:
- New builder instance
- Since:
- 1.4.0
-
withArgument
Create a new builder instance using the given command argument- Type Parameters:
N
- New argument type- Parameters:
argument
- Command argument- Returns:
- New builder instance
-
withArgument
Create a new builder instance using the given command argument- Type Parameters:
N
- New argument type- Parameters:
builder
- Command argument builder.CommandArgument.Builder.build()
will be invoked.- Returns:
- New builder instance
-
build
Build a new command flag instance- Returns:
- Constructed instance
-