Crossfire JXClient, Trunk
R20561
|
Abstract base class for Command implementations. More...
Public Member Functions | |
String | getCommandName () |
Returns the name of the command.
| |
String | toString () |
![]() | |
boolean | allArguments () |
Returns whether all remaining commands should be included as arguments. More... | |
void | execute (@NotNull String args) |
Executes the command with the given arguments. More... | |
Protected Member Functions | |
AbstractCommand (@NotNull final String commandName, @NotNull final CrossfireServerConnection crossfireServerConnection) | |
Creates a new instance. More... | |
void | drawInfo (@NotNull final String message) |
Displays a regular output message. More... | |
void | drawInfo (@NotNull final String message, final int color) |
Displays a message. More... | |
void | drawInfoError (@NotNull final String message) |
Displays an error message. More... | |
Private Attributes | |
final String | commandName |
The name of the command. More... | |
final CrossfireServerConnection | crossfireServerConnection |
The connection instance. More... | |
Abstract base class for Command implementations.
Definition at line 32 of file AbstractCommand.java.
|
protected |
Creates a new instance.
commandName | the name of the command |
crossfireServerConnection | the connection instance |
Definition at line 51 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName, and com.realtime.crossfire.jxclient.commands.AbstractCommand.crossfireServerConnection.
|
protected |
Displays a regular output message.
message | the message |
Definition at line 60 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.server.crossfire.CrossfireDrawinfoListener.NDI_BLACK.
Referenced by com.realtime.crossfire.jxclient.commands.AbstractCommand.drawInfoError(), com.realtime.crossfire.jxclient.commands.BindingsCommand.execute(), com.realtime.crossfire.jxclient.commands.DebugMessagesCommand.execute(), com.realtime.crossfire.jxclient.commands.ScriptsCommand.execute(), and com.realtime.crossfire.jxclient.commands.ScreenshotCommand.execute().
|
protected |
Displays a message.
message | the message |
color | the color code |
Definition at line 77 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.drawInfo().
|
protected |
Displays an error message.
message | the error message |
Definition at line 68 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.commands.AbstractCommand.drawInfo(), and com.realtime.crossfire.jxclient.server.crossfire.CrossfireDrawinfoListener.NDI_RED.
Referenced by com.realtime.crossfire.jxclient.commands.ScriptCommand.execute(), com.realtime.crossfire.jxclient.commands.UnbindCommand.execute(), com.realtime.crossfire.jxclient.commands.DebugMessagesCommand.execute(), com.realtime.crossfire.jxclient.commands.ClearCommand.execute(), com.realtime.crossfire.jxclient.commands.ScriptkillallCommand.execute(), com.realtime.crossfire.jxclient.commands.ScriptkillCommand.execute(), com.realtime.crossfire.jxclient.commands.ExecCommand.execute(), com.realtime.crossfire.jxclient.commands.SetCommand.execute(), com.realtime.crossfire.jxclient.commands.ScripttellCommand.execute(), com.realtime.crossfire.jxclient.commands.AgainCommand.execute(), com.realtime.crossfire.jxclient.commands.BindCommand.execute(), and com.realtime.crossfire.jxclient.commands.ScreenshotCommand.execute().
String com.realtime.crossfire.jxclient.commands.AbstractCommand.getCommandName | ( | ) |
Returns the name of the command.
Implements com.realtime.crossfire.jxclient.commands.Command.
Definition at line 86 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName.
String com.realtime.crossfire.jxclient.commands.AbstractCommand.toString | ( | ) |
Definition at line 95 of file AbstractCommand.java.
References com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName.
|
private |
The name of the command.
Definition at line 38 of file AbstractCommand.java.
Referenced by com.realtime.crossfire.jxclient.commands.AbstractCommand.AbstractCommand(), com.realtime.crossfire.jxclient.commands.AbstractCommand.getCommandName(), and com.realtime.crossfire.jxclient.commands.AbstractCommand.toString().
|
private |
The connection instance.
Definition at line 44 of file AbstractCommand.java.
Referenced by com.realtime.crossfire.jxclient.commands.AbstractCommand.AbstractCommand().