Class CommandFlag<T>
java.lang.Object
cloud.commandframework.arguments.flags.CommandFlag<T>
- Type Parameters:
T
- Command argument type.Void
is used when no argument is present.
A flag is an optional command argument that may have an associated parser,
and is identified by its name. Essentially, it's a mixture of a command literal
and an optional variable command argument.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@NonNull Collection<@NonNull String>
Get all flag aliases.@NonNull ArgumentDescription
Get the flag description.@Nullable CommandArgument<?,T>
Get the command argument, if it exists@NonNull Description
Deprecated.for removal since 1.4.0.@NonNull String
getName()
Get the flag nameint
hashCode()
static @NonNull CommandFlag.Builder<Void>
newBuilder(@NonNull String name)
Create a new flag buildertoString()
-
Method Details
-
newBuilder
Create a new flag builder- Parameters:
name
- Flag name- Returns:
- Flag builder
-
getName
Get the flag name- Returns:
- Flag name
-
getAliases
Get all flag aliases. This does not include the flag name- Returns:
- Flag aliases
-
getDescription
Deprecated.for removal since 1.4.0. UsegetArgumentDescription()
instead.Get the flag description- Returns:
- Flag description
-
getArgumentDescription
Get the flag description.- Returns:
- Flag description
- Since:
- 1.4.0
-
getCommandArgument
Get the command argument, if it exists- Returns:
- Command argument, or
null
-
toString
-
equals
-
hashCode
public int hashCode()
-