@ThreadSafe public interface Commands extends Registry<Command>
To access this handler, use this code:
Commands handler = Registered.commands();
Modifier and Type | Method and Description |
---|---|
void |
handle(String message,
CommandIssuer issuer)
Handles the message sent, without the preceding "/"
|
int |
register(Plugin plugin,
Command command)
Registers the command for the plugin
|
void |
unregister(Class<? extends Command> cls)
Unregisters the given command handler
|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
void handle(String message, CommandIssuer issuer)
message
- the command executedint register(Plugin plugin, Command command)
You do not need to call this method unless the command is marked with
IgnoreRegistration
plugin
- the plugin to register forcommand
- the command to registervoid unregister(Class<? extends Command> cls)
cls
- the command to unregisterCopyright © 2016. All rights reserved.