public abstract class SubCommand extends Object
| Constructor and Description |
|---|
SubCommand(ICommand<?> command) |
| Modifier and Type | Method and Description |
|---|---|
ICommand<?> |
getCommand() |
abstract String |
getName() |
abstract void |
handleSubcommand(User<?> sender,
String[] args)
Abstract method to handle the subcommand
|
void |
perform(User<?> sender,
String[] args)
Parent of the handleSubcommand abstract method.
|
void |
setPermission(String permission,
String message)
Do not use this method
|
public SubCommand(ICommand<?> command)
command - Parent of the subcommandpublic abstract String getName()
public ICommand<?> getCommand()
public void perform(User<?> sender, String[] args)
sender - Command executorargs - Args of the command. The args[0] will be the getName()public abstract void handleSubcommand(User<?> sender, String[] args)
sender - Command executorargs - Args of the command. The args[0] will be the getName()public void setPermission(String permission, String message) throws NoSuchMethodException, LibraryException
permission - Permission required from the subcommandmessage - Error messageNoSuchMethodException - Strange, that methods exists..LibraryException - Caused when someone manually call this method.