public interface Dispatcher extends CommandCallable
Modifier and Type | Method and Description |
---|---|
boolean |
containsAlias(String alias)
Returns whether the dispatcher contains a registered command for the
given alias.
|
boolean |
containsMapping(CommandMapping mapping)
Returns whether the dispatcher contains the given mapping.
|
Optional<? extends CommandMapping> |
get(String alias)
Get the
CommandMapping associated with an alias. |
Set<String> |
getAliases()
Get a list of all the command aliases, which includes the primary alias.
|
Multimap<String,CommandMapping> |
getAll()
Get all commands currently registered with this dispatcher.
|
Set<? extends CommandMapping> |
getAll(String alias)
Gets all the
CommandMapping s associated with an alias. |
Set<? extends CommandMapping> |
getCommands()
Get a list of commands.
|
Set<String> |
getPrimaryAliases()
Get a list of primary aliases.
|
getHelp, getShortDescription, getSuggestions, getUsage, process, testPermission
Set<? extends CommandMapping> getCommands()
The returned collection cannot be modified.
Set<String> getPrimaryAliases()
The returned collection cannot be modified.
Set<String> getAliases()
A command may have more than one alias assigned to it. The returned collection cannot be modified.
Optional<? extends CommandMapping> get(String alias)
CommandMapping
associated with an alias. Returns
null if no command is named by the given alias.alias
- The aliasSet<? extends CommandMapping> getAll(String alias)
CommandMapping
s associated with an alias.alias
- The aliasMultimap<String,CommandMapping> getAll()
boolean containsAlias(String alias)
alias
- The aliasboolean containsMapping(CommandMapping mapping)
mapping
- The mapping