public class WauzCommandExecutor
extends java.lang.Object
WauzCommand| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,WauzCommand> |
commandMap
A map of all registered commands.
|
| Constructor and Description |
|---|
WauzCommandExecutor() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
execute(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
java.lang.String[] args)
Executes the given command, if it is valid
|
static WauzCommand |
getCommand(java.lang.String commandId)
Gets a command for given id from the map.
|
static void |
registerCommand(WauzCommand command)
Registers a command.
|
private static java.util.Map<java.lang.String,WauzCommand> commandMap
public static WauzCommand getCommand(java.lang.String commandId)
commandId - The id of the command.public static void registerCommand(WauzCommand command)
command - The command to register.public static boolean execute(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
java.lang.String[] args)
sender - The sender of the command.cmd - The name of the command.args - The arguments of the command.