megamek.client.commands
Class ClientCommand
java.lang.Object
megamek.client.commands.ClientCommand
- Direct Known Subclasses:
- AddBotCommand, DeployCommand, FireCommand, HelpCommand, MoveCommand, RulerCommand, ShowEntityCommand, ShowTileCommand
public abstract class ClientCommand
- extends java.lang.Object
- Author:
- dirk
|
Constructor Summary |
ClientCommand(Client client,
java.lang.String name,
java.lang.String helpText)
Creates new ServerCommand |
|
Method Summary |
static java.lang.String |
getDirection(int arg)
|
static int |
getDirection(java.lang.String arg)
|
java.lang.String |
getHelp()
Returns some help text for this command |
java.lang.String |
getName()
Return the string trigger for this command |
abstract java.lang.String |
run(java.lang.String[] args)
Run this command with the arguments supplied |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
client
protected Client client
ClientCommand
public ClientCommand(Client client,
java.lang.String name,
java.lang.String helpText)
- Creates new ServerCommand
getName
public java.lang.String getName()
- Return the string trigger for this command
getHelp
public java.lang.String getHelp()
- Returns some help text for this command
run
public abstract java.lang.String run(java.lang.String[] args)
- Run this command with the arguments supplied
getDirection
public static int getDirection(java.lang.String arg)
getDirection
public static java.lang.String getDirection(int arg)