 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.commands;
28 import org.jetbrains.annotations.NotNull;
58 public void execute(@NotNull
final String args) {
81 drawInfoError(
"Valid arguments are 'colors', 'types', 'on', or 'off'. 'colors' prints messages using different message colors, 'types' prints messages using different message types, 'on' and 'off' enables/disables printing of message types.");
90 final StringBuilder sb =
new StringBuilder();
91 sb.append(
"Prints information for debugging the client\n");
93 sb.append(
"Usage: debug_messages colors\n");
94 sb.append(
"Usage: debug_messages types\n");
95 sb.append(
"Usage: debug_messages on\n");
96 sb.append(
"Usage: debug_messages off\n");
98 sb.append(
"'colors' prints messages using different message colors, ");
99 sb.append(
"'types' prints messages using different message types, ");
100 sb.append(
"'on' and 'off' enables/disables printing of message types.\n");
101 return sb.toString();
static String getColorName(final int index)
Returns the name of a color index.
static final int NUM_COLORS
The number of supported colors.
static int[] getAllTypes(final boolean includeJXClientType)
Returns all defined message types.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
Adds drawinfo, drawextinfo, and query messages to a Buffer instance.
Abstract base class for Command implementations.
Encapsulates the message type numbers for drawextinfo messages.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.
String getHelp()
Returns the help text for this command.
void drawextinfo(int color, int type, int subtype, String message)
Pretends that a drawextinfo message has been received.
void execute(@NotNull final String args)
Executes the command with the given arguments.
DebugMessagesCommand(@NotNull final CrossfireServerConnection crossfireServerConnection)
Creates a new instance.
void drawInfoError(@NotNull final String message)
Displays an error message.
void drawInfo(@NotNull final String message)
Displays a regular output message.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
void drawInfoSetDebugMode(boolean printMessageTypes)
Enables or disables printing of message types.
Implements the "debug_messages" command.