Class PacketWatcher
- java.lang.Object
-
- com.realtime.crossfire.jxclient.scripts.PacketWatcher
-
public class PacketWatcher extends java.lang.ObjectImplements the "watch" function for client-sided scripts.
-
-
Constructor Summary
Constructors Constructor Description PacketWatcher(@NotNull CrossfireServerConnection crossfireServerConnection, @NotNull ScriptProcess scriptProcess)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommand(@NotNull java.lang.String command)Adds a command to watch for.voiddestroy()Releases allocated resources.voidremoveCommand(@NotNull java.lang.String command)Removes a command to watch for.
-
-
-
Constructor Detail
-
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 Detail
-
destroy
public void destroy()
Releases allocated resources. Must be called before this instance is freed.
-
addCommand
public void addCommand(@NotNull @NotNull java.lang.String command)Adds a command to watch for.- Parameters:
command- the command
-
removeCommand
public void removeCommand(@NotNull @NotNull java.lang.String command)Removes a command to watch for.- Parameters:
command- the command
-
-