Package cloud.spawnery.agent.api
Record Class ConnectResult
java.lang.Object
java.lang.Record
cloud.spawnery.agent.api.ConnectResult
- Record Components:
alreadyThere- the one case where nothing was ordered and nothing is wrong: the player was ontargetwhen the request arrived.
What the operator did with a
SpawneryApi.connect(java.util.UUID, cloud.spawnery.agent.api.Target) call.
ordered is not moved. The proxy that carries a move
does not wait for the connection to finish, so nothing can report whether a
player arrived. ordered says the instruction reached a proxy holding
the player; to know they arrived, read SpawneryApi.player(java.util.UUID) a moment
later.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectResult(boolean ordered, boolean alreadyThere, String target) Creates an instance of aConnectResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thealreadyThererecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanordered()Returns the value of theorderedrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectResult
Creates an instance of aConnectResultrecord class.- Parameters:
ordered- the value for theorderedrecord componentalreadyThere- the value for thealreadyThererecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
ordered
public boolean ordered()Returns the value of theorderedrecord component.- Returns:
- the value of the
orderedrecord component
-
alreadyThere
public boolean alreadyThere()Returns the value of thealreadyThererecord component.- Returns:
- the value of the
alreadyThererecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-