Class NumLookObjects

java.lang.Object
com.realtime.crossfire.jxclient.server.crossfire.NumLookObjects

public class NumLookObjects extends Object
Negotiates the size of the ground view in items with the Crossfire server.
  • Method Details

    • connected

      public void connected()
      Called after the server connection has been established.
    • processSetupNumLookObjects

      public void processSetupNumLookObjects(@NotNull @NotNull String value) throws UnknownCommandException
      Called when a "setup num_look_objects" response has been received from the server.
      Parameters:
      value - the value of the message
      Throws:
      UnknownCommandException - if the value cannot be parsed
    • setPreferredNumLookObjects

      public void setPreferredNumLookObjects(int preferredNumLookObjects)
      Sets the preferred number of ground items.
      Parameters:
      preferredNumLookObjects - the number of ground items
    • getCurrentNumLookObjects

      public int getCurrentNumLookObjects()
      Returns the current number of ground items.
      Returns:
      the number of ground items
    • waitForCurrentNumLookObjectsValid

      public void waitForCurrentNumLookObjectsValid() throws InterruptedException
      Waits until getCurrentNumLookObjects() is stable. This function returns as soon as the negotiation with the Crossfire server is complete.
      Throws:
      InterruptedException - if the current thread was interrupted
    • setClientSocketState

      public void setClientSocketState(@NotNull @NotNull ClientSocketState clientSocketState)
      Called whenever the client socket state has changed.
      Parameters:
      clientSocketState - the new client socket state