Record Class BasicQueryResponse

java.lang.Object
java.lang.Record
net.minestom.server.extras.query.response.BasicQueryResponse

public record BasicQueryResponse(String motd, String gameType, String map, String numPlayers, String maxPlayers, short port, String address) extends Record
A basic query response containing a fixed set of responses.
  • Field Details

  • Constructor Details

    • BasicQueryResponse

      public BasicQueryResponse()
      Creates a new basic query response with pre-filled default values.
    • BasicQueryResponse

      public BasicQueryResponse(String motd, String gameType, String map, String numPlayers, String maxPlayers, short port, String address)
      Creates an instance of a BasicQueryResponse record class.
      Parameters:
      motd - the value for the motd record component
      gameType - the value for the gameType record component
      map - the value for the map record component
      numPlayers - the value for the numPlayers record component
      maxPlayers - the value for the maxPlayers record component
      port - the value for the port record component
      address - the value for the address record component
  • Method Details

    • 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.
    • motd

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

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

      public String map()
      Returns the value of the map record component.
      Returns:
      the value of the map record component
    • numPlayers

      public String numPlayers()
      Returns the value of the numPlayers record component.
      Returns:
      the value of the numPlayers record component
    • maxPlayers

      public String maxPlayers()
      Returns the value of the maxPlayers record component.
      Returns:
      the value of the maxPlayers record component
    • port

      public short port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • address

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