Package cloud.commandframework.arguments
Class StaticArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,String>
cloud.commandframework.arguments.StaticArgument<C>
- Type Parameters:
C
- Command sender type
- All Implemented Interfaces:
CloudKeyHolder<String>
,Comparable<CommandArgument<?,
?>>
CommandArgument
type that recognizes fixed strings. This type does not parse variables.-
Nested Class Summary
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,
T>, CommandArgument.TypedBuilder<C, T, B extends CommandArgument.Builder<C, T>> -
Method Summary
Modifier and TypeMethodDescriptionGet an immutable view of the aliasesGet an immutable list of all aliases that are not the main literalstatic <C> @NonNull StaticArgument<C>
Create a new static argument instance for a required command argumentvoid
registerAlias
(@NonNull String alias) Register a new aliasMethods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Method Details
-
of
Create a new static argument instance for a required command argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namealiases
- Argument aliases- Returns:
- Constructed argument
-
registerAlias
Register a new alias- Parameters:
alias
- New alias
-
getAliases
Get an immutable view of the aliases- Returns:
- Immutable view of the argument aliases
-
getAlternativeAliases
Get an immutable list of all aliases that are not the main literal- Returns:
- Immutable view of the optional argument aliases
-