22 package com.realtime.crossfire.jxclient.commands;
27 import org.jetbrains.annotations.NotNull;
47 super(
"debug_messages", crossfireServerConnection);
63 public void execute(@NotNull
final String args) {
73 crossfireServerConnection.
drawextinfo(0, type, 0,
"This line is type #"+type+
".");
86 drawInfoError(
"Valid arguments are 'colors', 'types', 'on', or 'off'. 'colors' prints messages using different message types, 'on' and 'off' enable/disable printing of message types.");
Abstract base class for Command implementations.
static int [] getAllTypes()
Returns all defined message types.
static final int NUM_COLORS
The number of supported colors.
Encapsulates the message type numbers for drawextinfo messages.
void drawInfoError(@NotNull final String message)
Displays an error message.
DebugMessagesCommand(@NotNull final CrossfireServerConnection crossfireServerConnection)
Creates a new instance.
static String getColorName(final int index)
Returns the name of a color index.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.whether all remaining commands...
void execute(@NotNull final String args)
Executes the command with the given arguments.the command arguments
void drawInfoSetDebugMode(boolean printMessageTypes)
Enables or disables printing of message types.
void drawextinfo(int color, int type, int subtype, String message)
Pretends that a drawextinfo message has been received.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
Implements the "debug_messages" command.
Adds drawinfo, drawextinfo, and query messages to a Buffer instance.
void drawInfo(@NotNull final String message)
Displays a regular output message.