public interface CrossfireServerConnection extends com.realtime.crossfire.jxclient.faces.AskfaceQueue, ServerConnection
ServerConnection
.Modifier and Type | Method and Description |
---|---|
void |
addCrossfireAccountListener(@NotNull CrossfireAccountListener listener)
Adds a listener to be notified about account events.
|
void |
addCrossfireComcListener(@NotNull CrossfireComcListener listener)
Adds a listener to be notified about received comc commands.
|
void |
addCrossfireDrawextinfoListener(@NotNull CrossfireDrawextinfoListener listener)
Adds a new listener monitoring the drawextinfo S->C messages.
|
void |
addCrossfireDrawinfoListener(@NotNull CrossfireDrawinfoListener listener)
Adds a new listener monitoring the drawinfo S->C messages.
|
void |
addCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Adds a listener to be notified of failure messages.
|
void |
addCrossfireMagicmapListener(@NotNull CrossfireMagicmapListener listener)
Adds a listener from the list of objects listening to magicmap messages.
|
void |
addCrossfireMusicListener(@NotNull CrossfireMusicListener listener)
Adds a listener to be notified about received music commands.
|
void |
addCrossfirePickupListener(@NotNull CrossfirePickupListener listener)
Adds a listener to be notified about received "pickup" messages.
|
void |
addCrossfireQueryListener(@NotNull CrossfireQueryListener listener)
Adds a new listener monitoring the query S->C messages.
|
void |
addCrossfireSoundListener(@NotNull CrossfireSoundListener listener)
Adds a listener to be notified about received sound commands.
|
void |
addCrossfireTickListener(@NotNull CrossfireTickListener listener)
Adds a listener to be notified about tick changes.
|
void |
addCrossfireUpdateItemListener(@NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
Adds a listener to be notified about item changes.
|
void |
addPacketWatcherListener(@NotNull ReceivedPacketListener listener)
Adds a listener to be notified about received packets.
|
void |
addSentReplyListener(@NotNull SentReplyListener listener)
Adds a listener to be notified about sent reply packets.
|
void |
drawextinfo(int color,
int type,
int subtype,
java.lang.String message)
Pretends that a drawextinfo message has been received.
|
void |
drawInfo(@NotNull java.lang.String message,
int color)
Pretends that a drawinfo message has been received.
|
void |
drawInfoSetDebugMode(boolean printMessageTypes)
Enables or disables printing of message types.
|
@Nullable java.lang.String |
getAccountName()
Returns the current account name.
|
void |
removeCrossfireAccountListener(@NotNull CrossfireAccountListener listener)
Removes a listener to be notified about account events.
|
void |
removeCrossfireDrawextinfoListener(@NotNull CrossfireDrawextinfoListener listener)
Removes the given listener from the list of objects listening to the
drawextinfo S->C messages.
|
void |
removeCrossfireDrawinfoListener(@NotNull CrossfireDrawinfoListener listener)
Removes the given listener from the list of objects listening to the
drawinfo S->C messages.
|
void |
removeCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Removes a listener to be notified of failure messages.
|
void |
removeCrossfireMagicmapListener(@NotNull CrossfireMagicmapListener listener)
Removes a listener from the list of objects listening to magicmap
messages.
|
void |
removeCrossfirePickupListener(@NotNull CrossfirePickupListener listener)
Removes a listener to be notified about received "pickup" messages.
|
void |
removeCrossfireQueryListener(@NotNull CrossfireQueryListener listener)
Removes the given listener from the list of objects listening to the
query S->C messages.
|
void |
removeCrossfireUpdateItemListener(@NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
Removes a listener to be notified about item changes.
|
void |
removePacketWatcherListener(@NotNull ReceivedPacketListener listener)
Removes a listener to be notified about received packets.
|
void |
removeSentReplyListener(@NotNull SentReplyListener listener)
Removes a listener to be notified about sent reply packets.
|
void |
sendAccountCharacterCreate(@NotNull java.lang.String login,
@NotNull java.lang.String password,
@NotNull java.util.Collection<java.lang.String> attributes)
Sends a request to create a new character associated to the account.
|
void |
sendAccountCreate(@NotNull java.lang.String login,
@NotNull java.lang.String password)
Sends a request to create a new account.
|
void |
sendAccountLink(int force,
@NotNull java.lang.String login,
@NotNull java.lang.String password)
Sends a request to add an existing character to an account.
|
void |
sendAccountLogin(@NotNull java.lang.String login,
@NotNull java.lang.String password)
Asks for an account login.
|
void |
sendAccountPassword(@NotNull java.lang.String currentPassword,
@NotNull java.lang.String newPassword)
Sends a request to change the account's password.
|
void |
sendAccountPlay(@NotNull java.lang.String name)
Sends a request to play a character from an account.
|
void |
sendAddme()
Sends an "addme" command to the server.
|
void |
sendApply(int tag)
Sends an "apply" command to the server.
|
void |
sendExamine(int tag)
Sends an "examine" command to the server.
|
void |
sendLock(boolean val,
int tag)
Sends a "lock" command to the server.
|
void |
sendLookat(int dx,
int dy)
Sends a "lookat" command to the server.
|
void |
sendMark(int tag)
Sends a "mark" command to the server.
|
void |
sendMove(int to,
int tag,
int nrof)
Sends a "move" command to the server.
|
int |
sendNcom(int repeat,
@NotNull java.lang.String command)
Sends a "ncom" command to the server.
|
void |
sendRawString(@NotNull java.lang.String command)
Sends an arbitrary string command to the server.
|
void |
sendReply(@NotNull java.lang.String text)
Sends a "reply" command to the server.
|
void |
sendRequestinfo(@NotNull java.lang.String infoType)
Sends a "requestinfo" command to the server.
|
void |
sendSetup(java.lang.String... options)
Sends a "setup" command to the server.
|
void |
sendToggleextendedtext(int... types)
Sends a "toggleextendedtext" command to the server.
|
void |
sendVersion(int csval,
int scval,
@NotNull java.lang.String vinfo)
Sends a "version" command to the server.
|
void |
setCrossfireUpdateMapListener(@Nullable CrossfireUpdateMapListener listener)
Sets a listener to be notified about map changes.
|
void |
setPreferredMapSize(int preferredMapWidth,
int preferredMapHeight)
Sets the preferred map size.
|
void |
setPreferredNumLookObjects(int preferredNumLookObjects)
Sets the maximum number of objects in the ground view.
|
void |
start()
Starts operation.
|
void |
stop()
Stops operation.
|
addFaceReceivedListener, sendAskface
addClientSocketListener, connect, disconnect, removeClientSocketListener
void start()
void stop() throws java.lang.InterruptedException
java.lang.InterruptedException
- if stopping was interruptedvoid addCrossfireDrawinfoListener(@NotNull @NotNull CrossfireDrawinfoListener listener)
listener
- the listener to removevoid removeCrossfireDrawinfoListener(@NotNull @NotNull CrossfireDrawinfoListener listener)
listener
- the listener to removevoid addCrossfireDrawextinfoListener(@NotNull @NotNull CrossfireDrawextinfoListener listener)
listener
- the listener to removevoid removeCrossfireDrawextinfoListener(@NotNull @NotNull CrossfireDrawextinfoListener listener)
listener
- the listener to removevoid addCrossfireQueryListener(@NotNull @NotNull CrossfireQueryListener listener)
listener
- the listener to removevoid removeCrossfireQueryListener(@NotNull @NotNull CrossfireQueryListener listener)
listener
- the listener to removevoid addCrossfireMagicmapListener(@NotNull @NotNull CrossfireMagicmapListener listener)
listener
- the listener to addvoid removeCrossfireMagicmapListener(@NotNull @NotNull CrossfireMagicmapListener listener)
listener
- the listener to removevoid addCrossfireUpdateItemListener(@NotNull @NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
crossfireUpdateItemListener
- the listener to addvoid removeCrossfireUpdateItemListener(@NotNull @NotNull CrossfireUpdateItemListener crossfireUpdateItemListener)
crossfireUpdateItemListener
- the listener to removevoid setCrossfireUpdateMapListener(@Nullable @Nullable CrossfireUpdateMapListener listener)
listener
- the listener to set or null
to unset itvoid addCrossfireTickListener(@NotNull @NotNull CrossfireTickListener listener)
listener
- the listener to addvoid addCrossfireSoundListener(@NotNull @NotNull CrossfireSoundListener listener)
listener
- the listener to addvoid addCrossfireMusicListener(@NotNull @NotNull CrossfireMusicListener listener)
listener
- the listener to addvoid addCrossfireComcListener(@NotNull @NotNull CrossfireComcListener listener)
listener
- the listener to addvoid addCrossfirePickupListener(@NotNull @NotNull CrossfirePickupListener listener)
listener
- the listener to addvoid removeCrossfirePickupListener(@NotNull @NotNull CrossfirePickupListener listener)
listener
- the listener to removevoid addPacketWatcherListener(@NotNull @NotNull ReceivedPacketListener listener)
listener
- the listener to addvoid removePacketWatcherListener(@NotNull @NotNull ReceivedPacketListener listener)
listener
- the listener to addvoid addSentReplyListener(@NotNull @NotNull SentReplyListener listener)
listener
- the listener to addvoid removeSentReplyListener(@NotNull @NotNull SentReplyListener listener)
listener
- the listener to addvoid addCrossfireAccountListener(@NotNull @NotNull CrossfireAccountListener listener)
listener
- the listener to addvoid removeCrossfireAccountListener(@NotNull @NotNull CrossfireAccountListener listener)
listener
- the listener to removevoid addCrossfireFailureListener(@NotNull @NotNull CrossfireFailureListener listener)
listener
- the listener to addvoid removeCrossfireFailureListener(@NotNull @NotNull CrossfireFailureListener listener)
listener
- the listener to removevoid drawInfo(@NotNull @NotNull java.lang.String message, int color)
message
- the messagecolor
- the colorvoid drawextinfo(int color, int type, int subtype, java.lang.String message)
type
- the message typesubtype
- the message subtypemessage
- the messagecolor
- the colorvoid drawInfoSetDebugMode(boolean printMessageTypes)
printMessageTypes
- whether to enable or disable message typesvoid sendAccountLogin(@NotNull @NotNull java.lang.String login, @NotNull @NotNull java.lang.String password)
login
- the account loginpassword
- the account passwordvoid sendAccountPlay(@NotNull @NotNull java.lang.String name)
name
- the character's name to playvoid sendAccountLink(int force, @NotNull @NotNull java.lang.String login, @NotNull @NotNull java.lang.String password)
force
- 0 to allow failure, 1 to force in certain situationslogin
- the character's loginpassword
- the character's passwordvoid sendAccountCreate(@NotNull @NotNull java.lang.String login, @NotNull @NotNull java.lang.String password)
login
- the account loginpassword
- the account passwordvoid sendAccountCharacterCreate(@NotNull @NotNull java.lang.String login, @NotNull @NotNull java.lang.String password, @NotNull @NotNull java.util.Collection<java.lang.String> attributes)
login
- the character's namepassword
- the character's passwordattributes
- the character attributesvoid sendAccountPassword(@NotNull @NotNull java.lang.String currentPassword, @NotNull @NotNull java.lang.String newPassword)
currentPassword
- current account passwordnewPassword
- new account passwordvoid sendAddme()
void sendApply(int tag)
tag
- the item to applyvoid sendExamine(int tag)
tag
- the item to examinevoid sendLock(boolean val, int tag)
val
- whether to lock the itemtag
- the item to lockvoid sendLookat(int dx, int dy)
dx
- the x-coordinate in tiles, relative to the playerdy
- the y-coordinate in tiles, relative to the playervoid sendMark(int tag)
tag
- the item to markvoid sendMove(int to, int tag, int nrof)
to
- the destination locationtag
- the item to movenrof
- the number of items to moveint sendNcom(int repeat, @NotNull @NotNull java.lang.String command)
repeat
- the repeat countcommand
- the commandvoid sendRawString(@NotNull @NotNull java.lang.String command)
command
- the commandvoid sendReply(@NotNull @NotNull java.lang.String text)
text
- the text to replyvoid sendRequestinfo(@NotNull @NotNull java.lang.String infoType)
infoType
- the info type to requestvoid sendSetup(@NotNull java.lang.String... options)
options
- the option/value pairs to sendvoid sendToggleextendedtext(@NotNull int... types)
types
- the types to requestvoid sendVersion(int csval, int scval, @NotNull @NotNull java.lang.String vinfo)
csval
- the client version numberscval
- the server version numbervinfo
- the client identification stringvoid setPreferredMapSize(int preferredMapWidth, int preferredMapHeight)
preferredMapWidth
- the preferred map width in tiles; must be oddpreferredMapHeight
- the preferred map height in tiles; must be oddvoid setPreferredNumLookObjects(int preferredNumLookObjects)
preferredNumLookObjects
- the number of objectsjava.lang.IllegalArgumentException
- if the number of objects is invalid@Nullable @Nullable java.lang.String getAccountName()
null