T - IPlugin implementation type.public abstract class TreeCommand<T extends IPlugin> extends SubCommand
| Constructor and Description |
|---|
TreeCommand(T plugin,
String name,
CommandType type,
String permission,
String usage,
String helpPrefix) |
TreeCommand(T plugin,
SubCommand values,
String helpPrefix)
Class Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(SubCommand... commands) |
abstract void |
addCommands() |
ColorScheme |
getColorScheme() |
SubCommand |
getCommand(String name)
Checks SubCommands for matching aliases.
|
List<SubCommand> |
getCommands()
Used to get the list of all subcommands.
|
String |
getHelpCmd() |
boolean |
onCommand(ISender sender,
String commandLabel,
String[] args)
Checks if Sender has rights to run the command and executes matching
subcommand.
|
TreeCommand<T> |
setColorScheme(ColorScheme cs) |
void |
setDefaultCommand(String defaultCommand) |
addHelp, getArguments, getCommandType, getFirstName, getInDepthHelp, getName, getPermission, getUsage, hasPermission, setInDepthHelppublic TreeCommand(T plugin, SubCommand values, String helpPrefix)
plugin - Current instancevalues - helpPrefix - public void setDefaultCommand(String defaultCommand)
public void add(SubCommand... commands)
public abstract void addCommands()
public List<SubCommand> getCommands()
public SubCommand getCommand(String name)
name - SubCommand in text form that might match alias.public boolean onCommand(ISender sender, String commandLabel, String[] args)
onCommand in class SubCommandsender - source of the command.commandLabel - label.args - arguments of the commandpublic String getHelpCmd()
public ColorScheme getColorScheme()
public TreeCommand<T> setColorScheme(ColorScheme cs)
Copyright © 2018. All rights reserved.