java.lang.Objectcom.realtime.crossfire.jxclient.commands.Commands
public class Commands
Parses and executes client-side commands.
| Field Summary | |
|---|---|
private CommandQueue |
commandQueue
The command queue for sending commands. |
private java.util.Map<java.lang.String,Command> |
commands
Maps command name to Command instance. |
| Constructor Summary | |
|---|---|
Commands(JXCWindowRenderer windowRenderer,
CommandQueue commandQueue,
CrossfireServerConnection crossfireServerConnection,
ScriptManager scriptManager,
OptionManager optionManager,
CommandCallback commandCallback,
Macros macros)
Creates a new instance. |
|
| Method Summary | |
|---|---|
private boolean |
execute(java.lang.String command,
java.lang.String commandList)
Executes a client-side command. |
void |
executeCommand(java.lang.CharSequence commands)
Executes a command or a list of commands. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private final CommandQueue commandQueue
@NotNull private final java.util.Map<java.lang.String,Command> commands
Command instance.
| Constructor Detail |
|---|
public Commands(@NotNull
JXCWindowRenderer windowRenderer,
@NotNull
CommandQueue commandQueue,
@NotNull
CrossfireServerConnection crossfireServerConnection,
@NotNull
ScriptManager scriptManager,
@NotNull
OptionManager optionManager,
@NotNull
CommandCallback commandCallback,
@NotNull
Macros macros)
windowRenderer - the renderer to usecommandQueue - the command queue for sending commandscrossfireServerConnection - the connection instancescriptManager - the script manager instanceoptionManager - the option manager instancecommandCallback - the command callback to usemacros - the macros instance to use| Method Detail |
|---|
private boolean execute(@NotNull
java.lang.String command,
@NotNull
java.lang.String commandList)
command - the commandcommandList - the command and all remaining commands of the command
list
true if all remaining commands have been consumed
public void executeCommand(@NotNull
java.lang.CharSequence commands)
commands - the commands to execute