Class PacketWatcher
java.lang.Object
com.realtime.crossfire.jxclient.scripts.PacketWatcher
Implements the "watch" function for client-sided scripts.
-
Constructor Summary
ConstructorsConstructorDescriptionPacketWatcher(@NotNull CrossfireServerConnection crossfireServerConnection, @NotNull ScriptProcess scriptProcess) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(@NotNull String command) Adds a command to watch for.voiddestroy()Releases allocated resources.voidremoveCommand(@NotNull String command) Removes a command to watch for.
-
Constructor Details
-
PacketWatcher
public PacketWatcher(@NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull ScriptProcess scriptProcess) Creates a new instance.- Parameters:
crossfireServerConnection- the server connection to watchscriptProcess- the script process for sending commands
-
-
Method Details
-
destroy
public void destroy()Releases allocated resources. Must be called before this instance is freed. -
addCommand
Adds a command to watch for.- Parameters:
command- the command
-
removeCommand
Removes a command to watch for.- Parameters:
command- the command
-