java.lang.Object
java.lang.Record
org.cloudburstmc.netty.channel.nethernet.signaling.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).

public record 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
    Modifier and Type
    Class
    Description
    static class 
    The defaults are placeholders, protocol 2187 and version 1.26.50 among them; a host sets what it speaks.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PongData
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a PongData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the connectionType record component.
    int
    Returns the value of the dataVersion record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the gameType record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isEditorWorld record component.
    boolean
    Returns the value of the isHardcore record component.
    Returns the value of the levelName record component.
    int
    Returns the value of the maxPlayerCount record component.
    Returns the value of the nonce record component.
    boolean
    Returns the value of the onlineAuth record component.
    int
    Returns the value of the playerCount record component.
    int
    Returns the value of the protocol record component.
    boolean
    Returns the value of the selfSignedAuth record component.
    Returns the value of the serverName record component.
    The document a client reads from GET /v1/join, in the order the schema lists.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the transportLayer record component.
    Returns the value of the version record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final PongData 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 a PongData record class.
      Parameters:
      serverName - the value for the serverName record component
      protocol - the value for the protocol record component
      version - the value for the version record component
      levelName - the value for the levelName record component
      gameType - the value for the gameType record component
      playerCount - the value for the playerCount record component
      maxPlayerCount - the value for the maxPlayerCount record component
      isEditorWorld - the value for the isEditorWorld record component
      isHardcore - the value for the isHardcore record component
      transportLayer - the value for the transportLayer record component
      connectionType - the value for the connectionType record component
      dataVersion - the value for the dataVersion record component
      onlineAuth - the value for the onlineAuth record component
      selfSignedAuth - the value for the selfSignedAuth record component
      nonce - the value for the nonce record component
  • Method Details

    • toJson

      public String toJson()
      The document a client reads from GET /v1/join, in the order the schema lists.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serverName

      public String serverName()
      Returns the value of the serverName record component.
      Returns:
      the value of the serverName record component
    • protocol

      public int protocol()
      Returns the value of the protocol record component.
      Returns:
      the value of the protocol record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • levelName

      public String levelName()
      Returns the value of the levelName record component.
      Returns:
      the value of the levelName record component
    • gameType

      public int gameType()
      Returns the value of the gameType record component.
      Returns:
      the value of the gameType record component
    • playerCount

      public int playerCount()
      Returns the value of the playerCount record component.
      Returns:
      the value of the playerCount record component
    • maxPlayerCount

      public int maxPlayerCount()
      Returns the value of the maxPlayerCount record component.
      Returns:
      the value of the maxPlayerCount record component
    • isEditorWorld

      public boolean isEditorWorld()
      Returns the value of the isEditorWorld record component.
      Returns:
      the value of the isEditorWorld record component
    • isHardcore

      public boolean isHardcore()
      Returns the value of the isHardcore record component.
      Returns:
      the value of the isHardcore record component
    • transportLayer

      public int transportLayer()
      Returns the value of the transportLayer record component.
      Returns:
      the value of the transportLayer record component
    • connectionType

      public int connectionType()
      Returns the value of the connectionType record component.
      Returns:
      the value of the connectionType record component
    • dataVersion

      public int dataVersion()
      Returns the value of the dataVersion record component.
      Returns:
      the value of the dataVersion record component
    • onlineAuth

      public boolean onlineAuth()
      Returns the value of the onlineAuth record component.
      Returns:
      the value of the onlineAuth record component
    • selfSignedAuth

      public boolean selfSignedAuth()
      Returns the value of the selfSignedAuth record component.
      Returns:
      the value of the selfSignedAuth record component
    • nonce

      public String nonce()
      Returns the value of the nonce record component.
      Returns:
      the value of the nonce record component