public interface CommandCallable extends CommandCompleter
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
call(java.lang.String arguments,
CommandLocals locals,
java.lang.String[] parentCommands)
Execute the correct command based on the input.
|
Description |
getDescription()
Get an object describing this command.
|
boolean |
testPermission(CommandLocals locals)
Test whether this command can be executed with the given context.
|
getSuggestions
java.lang.Object call(java.lang.String arguments, CommandLocals locals, java.lang.String[] parentCommands) throws CommandException
The implementing class must perform the necessary permission checks.
arguments
- the argumentslocals
- the localsparentCommands
- a list of parent commands, with the first most entry being the top-level commandCommandException
- thrown on a command errorDescription getDescription()
boolean testPermission(CommandLocals locals)
locals
- the locals