Record Class LoginStateChangeEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.LoginStateChangeEvent
- Record Components:
oldState- the previous login state valuenewState- the new login state valuetimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
public record LoginStateChangeEvent(int oldState, int newState, long timestamp)
extends Record
implements GameEvent
Fired when the client login state changes (e.g., lobby to logged in).
Settled states: 10 = login screen, 20 = lobby, 30 = in a world.
Other codes are not settled states; 0 means the agent could not resolve
the client yet.
-
Constructor Summary
ConstructorsConstructorDescriptionLoginStateChangeEvent(int oldState, int newState) LoginStateChangeEvent(int oldState, int newState, long timestamp) Creates an instance of aLoginStateChangeEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intnewState()Returns the value of thenewStaterecord component.intoldState()Returns the value of theoldStaterecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LoginStateChangeEvent
public LoginStateChangeEvent(int oldState, int newState) -
LoginStateChangeEvent
public LoginStateChangeEvent(int oldState, int newState, long timestamp) Creates an instance of aLoginStateChangeEventrecord class.
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
oldState
-
newState
-
timestamp
-