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) extends Record
Data structure for Pong advertisement data.
  • Field Details

  • 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)
      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
  • Method Details

    • toJson

      public String toJson()
    • 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