Package com.btcvelocity.api.bridge
Record Class BridgeMessage.WorldLoaded
java.lang.Object
java.lang.Record
com.btcvelocity.api.bridge.BridgeMessage.WorldLoaded
- Record Components:
serverName- the name of the server that loaded the worldworldName- the name of the world that was loadedloadTimeMs- the time in milliseconds it took to load the world
- All Implemented Interfaces:
BridgeMessage
- Enclosing interface:
BridgeMessage
public static record BridgeMessage.WorldLoaded(String serverName, String worldName, long loadTimeMs)
extends Record
implements BridgeMessage
Backend -> Proxy: a world has been loaded and is ready to accept players.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.btcvelocity.api.bridge.BridgeMessage
BridgeMessage.ConnectRequest, BridgeMessage.Health, BridgeMessage.PartyWarp, BridgeMessage.QueueJoin, BridgeMessage.QueueLeave, BridgeMessage.QueueStatusResponse, BridgeMessage.RequestStatus, BridgeMessage.WorldLoaded, BridgeMessage.WorldPreload, BridgeMessage.WorldUnloaded -
Constructor Summary
ConstructorsConstructorDescriptionWorldLoaded(String serverName, String worldName, long loadTimeMs) Creates an instance of aWorldLoadedrecord 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.longReturns the value of theloadTimeMsrecord component.Returns the value of theserverNamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the string discriminator used to route this message during (de)serialization.Returns the value of theworldNamerecord component.
-
Constructor Details
-
WorldLoaded
Creates an instance of aWorldLoadedrecord class.- Parameters:
serverName- the value for theserverNamerecord componentworldName- the value for theworldNamerecord componentloadTimeMs- the value for theloadTimeMsrecord component
-
-
Method Details
-
type
Description copied from interface:BridgeMessageReturns the string discriminator used to route this message during (de)serialization.- Specified by:
typein interfaceBridgeMessage- Returns:
- the message type identifier
-
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 '=='. -
serverName
Returns the value of theserverNamerecord component.- Returns:
- the value of the
serverNamerecord component
-
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
loadTimeMs
public long loadTimeMs()Returns the value of theloadTimeMsrecord component.- Returns:
- the value of the
loadTimeMsrecord component
-