22 package com.realtime.crossfire.jxclient.server.crossfire;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
46 @SuppressWarnings(
"RedundantThrows")
47 void stop()
throws InterruptedException;
209 void drawInfo(@NotNull String message,
int color);
218 void drawextinfo(
int color,
int type,
int subtype, String message);
245 void sendAccountLink(
int force, @NotNull String login, @NotNull String password);
290 void sendLock(
boolean val,
int tag);
311 void sendMove(
int to,
int tag,
int nrof);
319 int sendNcom(
int repeat, @NotNull String command);
337 void sendSetup(@NotNull String... options);
351 void sendVersion(
int csval,
int scval, @NotNull String vinfo);
void addCrossfireUpdateItemListener(@NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
Adds a listener to be notified about item changes.
void addCrossfireTickListener(@NotNull CrossfireTickListener listener)
Adds a listener to be notified about tick changes.
void setPreferredMapSize(int preferredMapWidth, int preferredMapHeight)
Sets the preferred map size.
Performs most of the network-related work.
void sendAccountPassword(@NotNull String currentPassword, @NotNull String newPassword)
Sends a request to change the account's password.
void addCrossfirePickupListener(@NotNull CrossfirePickupListener listener)
Adds a listener to be notified about received "pickup" messages.
void removeCrossfireUpdateItemListener(@NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
Removes a listener to be notified about item changes.
void sendAccountLink(int force, @NotNull String login, @NotNull String password)
Sends a request to add an existing character to an account.
Interface for listeners interested in drawinfo messages received from the Crossfire server...
void sendAccountLogin(@NotNull String login, @NotNull String password)
Asks for an account login.
void sendLock(boolean val, int tag)
Sends a "lock" command to the server.
Interface for listeners interested in "sound" commands.
void start()
Starts operation.
void addCrossfireAccountListener(@NotNull CrossfireAccountListener listener)
Adds a listener to be notified about account events.
Interface for listeners interested in "tick" commands.
void sendAccountCharacterCreate(@NotNull String login, @NotNull String password)
Sends a request to create a new character associated to the account.
Interface for classes that allow sending "askface" commands.
void setCrossfireUpdateMapListener(@Nullable CrossfireUpdateMapListener listener)
Sets a listener to be notified about map changes.
void sendMark(int tag)
Sends a "mark" command to the server.
Manages image information ("faces") needed to display the map view, items, and spell icons...
void removePacketWatcherListener(@NotNull ReceivedPacketListener listener)
Removes a listener to be notified about received packets.
void sendAccountCreate(@NotNull String login, @NotNull String password)
Sends a request to create a new account.
void drawInfoSetDebugMode(boolean printMessageTypes)
Enables or disables printing of message types.
void drawInfo(@NotNull String message, int color)
Pretends that a drawinfo message has been received.
Listener for classes interested in sent "reply" commands.
void addCrossfireMusicListener(@NotNull CrossfireMusicListener listener)
Adds a listener to be notified about received music commands.
int sendNcom(int repeat, @NotNull String command)
Sends a "ncom" command to the server.
void addCrossfireComcListener(@NotNull CrossfireComcListener listener)
Adds a listener to be notified about received comc commands.
void drawextinfo(int color, int type, int subtype, String message)
Pretends that a drawextinfo message has been received.
void sendVersion(int csval, int scval, @NotNull String vinfo)
Sends a "version" command to the server.
void sendAddme()
Sends an "addme" command to the server.
void addCrossfireDrawextinfoListener(@NotNull CrossfireDrawextinfoListener listener)
Adds a new listener monitoring the drawextinfo S->C messages.
Interface for listeners interested in "music" commands.
Interface for listeners interested in the "failure" messages received from the Crossfire server...
void sendToggleextendedtext(@NotNull int... types)
Sends a "toggleextendedtext" command to the server.
Interface for listeners interested in "pickup" messages.
void removeCrossfireMagicmapListener(@NotNull CrossfireMagicmapListener listener)
Removes a listener from the list of objects listening to magicmap messages.
void sendReply(@NotNull String text)
Sends a "reply" command to the server.
Interface for listeners interested in received packets.
void addCrossfireMagicmapListener(@NotNull CrossfireMagicmapListener listener)
Adds a listener from the list of objects listening to magicmap messages.
Interface for listeners interested in magicmap messages received from the Crossfire server...
void setPreferredNumLookObjects(int preferredNumLookObjects)
Sets the maximum number of objects in the ground view.
void addSentReplyListener(@NotNull SentReplyListener listener)
Adds a listener to be notified about sent reply packets.
void removeSentReplyListener(@NotNull SentReplyListener listener)
Removes a listener to be notified about sent reply packets.
Interface for listeners interested in account information related messages received from the Crossfir...
void addPacketWatcherListener(@NotNull ReceivedPacketListener listener)
Adds a listener to be notified about received packets.
Interface for listeners interested in drawextinfo messages received from the Crossfire server...
void removeCrossfireAccountListener(@NotNull CrossfireAccountListener listener)
Removes a listener to be notified about account events.
void addCrossfireQueryListener(@NotNull CrossfireQueryListener listener)
Adds a new listener monitoring the query S->C messages.
void removeCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Removes a listener to be notified of failure messages.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
void addCrossfireSoundListener(@NotNull CrossfireSoundListener listener)
Adds a listener to be notified about received sound commands.
void sendSetup(@NotNull String... options)
Sends a "setup" command to the server.
Interface for listeners interested in comc commands received from the server.
void sendApply(int tag)
Sends an "apply" command to the server.
void removeCrossfireDrawinfoListener(@NotNull CrossfireDrawinfoListener listener)
Removes the given listener from the list of objects listening to the drawinfo S->C messages...
void sendExamine(int tag)
Sends an "examine" command to the server.
void stop()
Stops operation.
void sendAccountPlay(@NotNull String name)
Sends a request to play a character from an account.
Interface for listeners interested in query messages received from the Crossfire server.
void sendLookat(final int dx, int dy)
Sends a "lookat" command to the server.
void removeCrossfirePickupListener(@NotNull CrossfirePickupListener listener)
Removes a listener to be notified about received "pickup" messages.
String getAccountName()
Returns the current account name.
void sendMove(int to, int tag, int nrof)
Sends a "move" command to the server.
void sendRequestinfo(@NotNull String infoType)
Sends a "requestinfo" command to the server.
Interface for listeners interested in map related commands.
void addCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Adds a listener to be notified of failure messages.
void removeCrossfireQueryListener(@NotNull CrossfireQueryListener listener)
Removes the given listener from the list of objects listening to the query S->C messages.
Interface for listeners interested in item related commands.
void removeCrossfireDrawextinfoListener(@NotNull CrossfireDrawextinfoListener listener)
Removes the given listener from the list of objects listening to the drawextinfo S->C messages...
void addCrossfireDrawinfoListener(@NotNull CrossfireDrawinfoListener listener)
Adds a new listener monitoring the drawinfo S->C messages.