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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the value of theaddress
record component.final boolean
Indicates whether some other object is "equal to" this one.gameType()
Returns the value of thegameType
record component.final int
hashCode()
Returns a hash code value for this object.map()
Returns the value of themap
record component.Returns the value of themaxPlayers
record component.motd()
Returns the value of themotd
record component.Returns the value of thenumPlayers
record component.short
port()
Returns the value of theport
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
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 aBasicQueryResponse
record class.- Parameters:
motd
- the value for themotd
record componentgameType
- the value for thegameType
record componentmap
- the value for themap
record componentnumPlayers
- the value for thenumPlayers
record componentmaxPlayers
- the value for themaxPlayers
record componentport
- the value for theport
record componentaddress
- the value for theaddress
record component
-
-
Method Details
-
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 '=='. -
motd
Returns the value of themotd
record component.- Returns:
- the value of the
motd
record component
-
gameType
Returns the value of thegameType
record component.- Returns:
- the value of the
gameType
record component
-
map
Returns the value of themap
record component.- Returns:
- the value of the
map
record component
-
numPlayers
Returns the value of thenumPlayers
record component.- Returns:
- the value of the
numPlayers
record component
-
maxPlayers
Returns the value of themaxPlayers
record component.- Returns:
- the value of the
maxPlayers
record component
-
port
public short port()Returns the value of theport
record component.- Returns:
- the value of the
port
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-