public class NumLookObjects
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
connected()
Called after the server connection has been established.
|
int |
getCurrentNumLookObjects()
Returns the current number of ground items.
|
void |
processSetupNumLookObjects(@NotNull java.lang.String value)
Called when a "setup num_look_objects" response has been received from
the server.
|
void |
setClientSocketState(@NotNull ClientSocketState clientSocketState)
Called whenever the client socket state has changed.
|
void |
setPreferredNumLookObjects(int preferredNumLookObjects)
Sets the preferred number of ground items.
|
void |
waitForCurrentNumLookObjectsValid()
Waits until
getCurrentNumLookObjects() is stable. |
public void connected()
public void processSetupNumLookObjects(@NotNull @NotNull java.lang.String value) throws UnknownCommandException
value
- the value of the messageUnknownCommandException
- if the value cannot be parsedpublic void setPreferredNumLookObjects(int preferredNumLookObjects)
preferredNumLookObjects
- the number of ground itemspublic int getCurrentNumLookObjects()
public void waitForCurrentNumLookObjectsValid() throws java.lang.InterruptedException
getCurrentNumLookObjects()
is stable. This function
returns as soon as the negotiation with the Crossfire server is
complete.java.lang.InterruptedException
- if the current thread was interruptedpublic void setClientSocketState(@NotNull @NotNull ClientSocketState clientSocketState)
clientSocketState
- the new client socket state