com.cliffblaster.game
Class Command

java.lang.Object
  extended by com.cliffblaster.game.Command
Direct Known Subclasses:
BanCommand, BanIPCommand, BroadcastCommand, DeOPCommand, HelpCommand, KickCommand, ListCommand, OPCommand, PardonCommand, PardonIPCommand, PluginsCommand, ResaltCommand, SeedCommand, SetAllCommand, SetSpawnCommand, StopCommand, TPCommand, TPHereCommand, TPToCommand, TreeCommand, UptimeCommand, VersionCommand

public abstract class Command
extends java.lang.Object


Constructor Summary
Command()
           
 
Method Summary
abstract  boolean execute(java.lang.String[] arguments, ServerHandler caller)
          Executes the command, arguments[0] is the command, args[1] is the first argument Caller is null if the caller is the console
protected  ServerHandler getHandle(java.lang.String partialUname)
           
abstract  java.lang.String getHelpDesc()
           
protected  PluginManager getPluginManager()
           
protected  com.cliffblaster.game.CommandHandler getRegisteredHandler()
           
protected  Server getServer()
           
abstract  boolean hasPermission(java.lang.String[] command, ServerHandler caller)
          Called to check whether the caller has permission to execute that command Caller is null if the caller is the console Must return true if the caller has permission
abstract  void printUsage(java.lang.String[] arguments, ServerHandler caller)
           
protected  PermissionRequestEvent requestPermission(ServerHandler caller, java.lang.String permission)
           
protected  void sendMessage(ServerHandler caller, java.lang.String message, ChatColor color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()
Method Detail

hasPermission

public abstract boolean hasPermission(java.lang.String[] command,
                                      ServerHandler caller)
Called to check whether the caller has permission to execute that command Caller is null if the caller is the console Must return true if the caller has permission


execute

public abstract boolean execute(java.lang.String[] arguments,
                                ServerHandler caller)
Executes the command, arguments[0] is the command, args[1] is the first argument Caller is null if the caller is the console


getHelpDesc

public abstract java.lang.String getHelpDesc()

printUsage

public abstract void printUsage(java.lang.String[] arguments,
                                ServerHandler caller)

getRegisteredHandler

protected final com.cliffblaster.game.CommandHandler getRegisteredHandler()

sendMessage

protected final void sendMessage(ServerHandler caller,
                                 java.lang.String message,
                                 ChatColor color)

getServer

protected final Server getServer()

getPluginManager

protected final PluginManager getPluginManager()

getHandle

protected final ServerHandler getHandle(java.lang.String partialUname)

requestPermission

protected final PermissionRequestEvent requestPermission(ServerHandler caller,
                                                         java.lang.String permission)