 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.commands;
27 import org.jetbrains.annotations.NotNull;
67 public void execute(@NotNull
final String args) {
73 if (args.equalsIgnoreCase(
"commands")) {
74 final StringBuilder sb =
new StringBuilder();
75 String separator =
" Client-sided commands:\n";
77 sb.append(separator).append(command);
87 if (command ==
null || command instanceof
HelpCommand) {
String getHelp()
Returns the help text for this command.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
String getHelp()
Returns the help text for this command.
Collection< String > getCommands()
Returns all defined commands.
Abstract base class for Command implementations.
final CommandQueue commandQueue
The CommandQueue instance for sending "help" commands to the server.
Parses and executes client-side commands.
void sendNcom(final boolean mustSend, @NotNull final String command)
Sends a "ncom" command to the server.
void execute(@NotNull final String args)
Executes the command with the given arguments.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
Implements the command "help".
final Commands commands
All defined client-sided commands.
void drawInfo(@NotNull final String message)
Displays a regular output message.
Maintains the pending (ncom) commands sent to the server.
Command findCommand(@NotNull final String commandName)
Returns a Command by name.
HelpCommand(@NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final CommandQueue commandQueue, @NotNull final Commands commands)
Creates a new instance.
Implements a client-side command.