public interface Dispatcher extends CommandCallable
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String alias)
Returns whether the dispatcher contains a registered command for the given alias.
|
CommandMapping |
get(String alias)
Get the
CommandCallable associated with an alias. |
Collection<String> |
getAliases()
Get a list of all the command aliases, which includes the primary alias.
|
Set<CommandMapping> |
getCommands()
Get a list of commands.
|
Collection<String> |
getPrimaryAliases()
Get a list of primary aliases.
|
void |
registerCommand(CommandCallable callable,
String... alias)
Register a command with this dispatcher.
|
call, getDescription, testPermissiongetSuggestionsvoid registerCommand(CommandCallable callable, String... alias)
callable - the command executoralias - a list of aliases, where the first alias is the primary nameSet<CommandMapping> getCommands()
The returned collection cannot be modified.
Collection<String> getPrimaryAliases()
The returned collection cannot be modified.
Collection<String> getAliases()
A command may have more than one alias assigned to it. The returned collection cannot be modified.
@Nullable CommandMapping get(String alias)
CommandCallable associated with an alias. Returns
null if no command is named by the given alias.alias - the aliasboolean contains(String alias)
alias - the aliasCopyright © 2010-2014. All Rights Reserved.