public abstract class PKCommand extends java.lang.Object implements SubCommand
SubCommand
.Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,PKCommand> |
instances
List of all command executors which extends PKCommand
|
Constructor and Description |
---|
PKCommand(java.lang.String name,
java.lang.String properUse,
java.lang.String description,
java.lang.String[] aliases) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAliases()
Gets the aliases for the command.
|
java.lang.String |
getDescription()
Gets the description of the command.
|
java.lang.String |
getElement(java.lang.String element)
Returns a string representation of one of the five base elements,
converted from any possible alias of that element, its combos, or its
subelements.
|
java.lang.String |
getName()
Gets the name of the command.
|
java.lang.String |
getProperUse()
Gets the proper use of the command, in the format '/b
name arg1 arg2 ... |
void |
help(org.bukkit.command.CommandSender sender,
boolean description)
Outputs the correct usage, and optionally the description, of a command
to the given
CommandSender . |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public static java.util.Map<java.lang.String,PKCommand> instances
public PKCommand(java.lang.String name, java.lang.String properUse, java.lang.String description, java.lang.String[] aliases)
public java.lang.String getName()
SubCommand
getName
in interface SubCommand
public java.lang.String getProperUse()
SubCommand
name
arg1 arg2 ... 'getProperUse
in interface SubCommand
public java.lang.String getDescription()
SubCommand
getDescription
in interface SubCommand
public java.lang.String[] getAliases()
SubCommand
getAliases
in interface SubCommand
public void help(org.bukkit.command.CommandSender sender, boolean description)
SubCommand
CommandSender
.help
in interface SubCommand
sender
- The CommandSender to output the help todescription
- Whether or not to output the description of the commandpublic java.lang.String getElement(java.lang.String element)
element
- The string to try and determine an element for