Class PacketWatcher

java.lang.Object
com.realtime.crossfire.jxclient.scripts.PacketWatcher

public class PacketWatcher extends Object
Implements the "watch" function for client-sided scripts.
  • Constructor Details

    • PacketWatcher

      public PacketWatcher(@NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull ScriptProcess scriptProcess)
      Creates a new instance.
      Parameters:
      crossfireServerConnection - the server connection to watch
      scriptProcess - the script process for sending commands
  • Method Details

    • destroy

      public void destroy()
      Releases allocated resources. Must be called before this instance is freed.
    • addCommand

      public void addCommand(@NotNull @NotNull String command)
      Adds a command to watch for.
      Parameters:
      command - the command
    • removeCommand

      public void removeCommand(@NotNull @NotNull String command)
      Removes a command to watch for.
      Parameters:
      command - the command