Record Class NetherNetServerSignaling.PongData
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.channel.nethernet.signaling.NetherNetServerSignaling.PongData
- Record Components:
serverName- The name of the server.protocol- The Bedrock protocol version the server speaks.version- The Bedrock version string the server reports.levelName- The name of the level/world.gameType- The game type (e.g. Survival, Creative).playerCount- The current number of players.maxPlayerCount- The maximum number of players allowed.isEditorWorld- Whether the world is an editor world.isHardcore- Whether the world is in hardcore mode.transportLayer- The transport layer identifier (e.g. NetherNet).connectionType- The connection type identifier (e.g. LAN, Online).
- Enclosing interface:
- NetherNetServerSignaling
public static record NetherNetServerSignaling.PongData(String serverName, int protocol, String version, String levelName, int gameType, int playerCount, int maxPlayerCount, boolean isEditorWorld, boolean isHardcore, int transportLayer, int connectionType, int dataVersion, boolean onlineAuth, boolean selfSignedAuth, String nonce)
extends Record
Data structure for Pong advertisement data.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPongData(String serverName, int protocol, String version, String levelName, int gameType, int playerCount, int maxPlayerCount, boolean isEditorWorld, boolean isHardcore, int transportLayer, int connectionType, int dataVersion, boolean onlineAuth, boolean selfSignedAuth, String nonce) Creates an instance of aPongDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theconnectionTyperecord component.intReturns the value of thedataVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.intgameType()Returns the value of thegameTyperecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisEditorWorldrecord component.booleanReturns the value of theisHardcorerecord component.Returns the value of thelevelNamerecord component.intReturns the value of themaxPlayerCountrecord component.nonce()Returns the value of thenoncerecord component.booleanReturns the value of theonlineAuthrecord component.intReturns the value of theplayerCountrecord component.intprotocol()Returns the value of theprotocolrecord component.booleanReturns the value of theselfSignedAuthrecord component.Returns the value of theserverNamerecord component.toJson()The document a client reads fromGET /v1/join, in the order the schema lists.final StringtoString()Returns a string representation of this record class.intReturns the value of thetransportLayerrecord component.version()Returns the value of theversionrecord component.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
PongData
public PongData(String serverName, int protocol, String version, String levelName, int gameType, int playerCount, int maxPlayerCount, boolean isEditorWorld, boolean isHardcore, int transportLayer, int connectionType, int dataVersion, boolean onlineAuth, boolean selfSignedAuth, String nonce) Creates an instance of aPongDatarecord class.- Parameters:
serverName- the value for theserverNamerecord componentprotocol- the value for theprotocolrecord componentversion- the value for theversionrecord componentlevelName- the value for thelevelNamerecord componentgameType- the value for thegameTyperecord componentplayerCount- the value for theplayerCountrecord componentmaxPlayerCount- the value for themaxPlayerCountrecord componentisEditorWorld- the value for theisEditorWorldrecord componentisHardcore- the value for theisHardcorerecord componenttransportLayer- the value for thetransportLayerrecord componentconnectionType- the value for theconnectionTyperecord componentdataVersion- the value for thedataVersionrecord componentonlineAuth- the value for theonlineAuthrecord componentselfSignedAuth- the value for theselfSignedAuthrecord componentnonce- the value for thenoncerecord component
-
-
Method Details
-
toJson
The document a client reads fromGET /v1/join, in the order the schema lists. -
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
-
protocol
public int protocol()Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
levelName
Returns the value of thelevelNamerecord component.- Returns:
- the value of the
levelNamerecord component
-
gameType
public int gameType()Returns the value of thegameTyperecord component.- Returns:
- the value of the
gameTyperecord component
-
playerCount
public int playerCount()Returns the value of theplayerCountrecord component.- Returns:
- the value of the
playerCountrecord component
-
maxPlayerCount
public int maxPlayerCount()Returns the value of themaxPlayerCountrecord component.- Returns:
- the value of the
maxPlayerCountrecord component
-
isEditorWorld
public boolean isEditorWorld()Returns the value of theisEditorWorldrecord component.- Returns:
- the value of the
isEditorWorldrecord component
-
isHardcore
public boolean isHardcore()Returns the value of theisHardcorerecord component.- Returns:
- the value of the
isHardcorerecord component
-
transportLayer
public int transportLayer()Returns the value of thetransportLayerrecord component.- Returns:
- the value of the
transportLayerrecord component
-
connectionType
public int connectionType()Returns the value of theconnectionTyperecord component.- Returns:
- the value of the
connectionTyperecord component
-
dataVersion
public int dataVersion()Returns the value of thedataVersionrecord component.- Returns:
- the value of the
dataVersionrecord component
-
onlineAuth
public boolean onlineAuth()Returns the value of theonlineAuthrecord component.- Returns:
- the value of the
onlineAuthrecord component
-
selfSignedAuth
public boolean selfSignedAuth()Returns the value of theselfSignedAuthrecord component.- Returns:
- the value of the
selfSignedAuthrecord component
-
nonce
Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-