net.minecraft.command
Class CommandHandler

java.lang.Object
  extended by net.minecraft.command.CommandHandler
All Implemented Interfaces:
ICommandManager
Direct Known Subclasses:
ServerCommandManager

public class CommandHandler
extends Object
implements ICommandManager


Constructor Summary
CommandHandler()
           
 
Method Summary
 void 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandHandler

public CommandHandler()
Method Detail

executeCommand

public void executeCommand(ICommandSender par1ICommandSender,
                           String par2Str)
Specified by:
executeCommand in interface ICommandManager

registerCommand

public ICommand registerCommand(ICommand par1ICommand)
adds the command and any aliases it has to the internal map of available commands


getPossibleCommands

public List getPossibleCommands(ICommandSender par1ICommandSender,
                                String par2Str)
Performs a "begins with" string match on each token in par2. Only returns commands that par1 can use.

Specified by:
getPossibleCommands in interface ICommandManager

getPossibleCommands

public List getPossibleCommands(ICommandSender par1ICommandSender)
returns all commands that the commandSender can use

Specified by:
getPossibleCommands in interface ICommandManager

getCommands

public Map getCommands()
returns a map of string to commads. All commands are returned, not just ones which someone has permission to use.

Specified by:
getCommands in interface ICommandManager