Record Class BasicQueryResponse
java.lang.Object
java.lang.Record
net.minestom.server.extras.query.response.BasicQueryResponse
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.gameType()Returns the value of thegameTyperecord component.final inthashCode()Returns a hash code value for this object.map()Returns the value of themaprecord component.Returns the value of themaxPlayersrecord component.motd()Returns the value of themotdrecord component.Returns the value of thenumPlayersrecord component.shortport()Returns the value of theportrecord component.final StringtoString()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 aBasicQueryResponserecord class.- Parameters:
motd- the value for themotdrecord componentgameType- the value for thegameTyperecord componentmap- the value for themaprecord componentnumPlayers- the value for thenumPlayersrecord componentmaxPlayers- the value for themaxPlayersrecord componentport- the value for theportrecord componentaddress- the value for theaddressrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
motd
Returns the value of themotdrecord component.- Returns:
- the value of the
motdrecord component
-
gameType
Returns the value of thegameTyperecord component.- Returns:
- the value of the
gameTyperecord component
-
map
Returns the value of themaprecord component.- Returns:
- the value of the
maprecord component
-
numPlayers
Returns the value of thenumPlayersrecord component.- Returns:
- the value of the
numPlayersrecord component
-
maxPlayers
Returns the value of themaxPlayersrecord component.- Returns:
- the value of the
maxPlayersrecord component
-
port
public short port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-