public class CommandHandler extends Object implements ICommandManager
Constructor and Description |
---|
CommandHandler() |
Modifier and Type | Method and Description |
---|---|
int |
executeCommand(ICommandSender par1ICommandSender,
String par2Str) |
Map |
getCommands()
returns a map of string to commads.
|
List |
getPossibleCommands(ICommandSender par1ICommandSender)
returns all commands that the commandSender can use
|
List |
getPossibleCommands(ICommandSender par1ICommandSender,
String par2Str)
Performs a "begins with" string match on each token in par2.
|
ICommand |
registerCommand(ICommand par1ICommand)
adds the command and any aliases it has to the internal map of available commands
|
public int executeCommand(ICommandSender par1ICommandSender, String par2Str)
executeCommand
in interface ICommandManager
public ICommand registerCommand(ICommand par1ICommand)
public List getPossibleCommands(ICommandSender par1ICommandSender, String par2Str)
getPossibleCommands
in interface ICommandManager
public List getPossibleCommands(ICommandSender par1ICommandSender)
getPossibleCommands
in interface ICommandManager
public Map getCommands()
getCommands
in interface ICommandManager