Class BasicQueryResponse
java.lang.Object
net.minestom.server.extras.query.response.BasicQueryResponse
- All Implemented Interfaces:
Writeable
A basic query response containing a fixed set of responses.
-
Constructor Summary
ConstructorDescriptionCreates a new basic query response with pre-filled default values. -
Method Summary
Modifier and TypeMethodDescription@NotNull String
Gets the gametype.@NotNull String
getMap()
Gets the map.@NotNull String
Gets the max number of players.@NotNull String
getMotd()
Gets the MoTD.@NotNull String
Gets the number of players.void
setGametype
(@NotNull String gametype) Sets the gametype.void
Sets the map.void
setMaxPlayers
(int maxPlayers) Sets the max number of players.void
setMaxPlayers
(@NotNull String maxPlayers) Sets the max number of players.void
Sets the MoTD.void
setNumPlayers
(int numPlayers) Sets the number of players.void
setNumPlayers
(@NotNull String numPlayers) Sets the number of players.void
write
(@NotNull BinaryWriter writer) Writes into aBinaryWriter
.
-
Constructor Details
-
BasicQueryResponse
public BasicQueryResponse()Creates a new basic query response with pre-filled default values.
-
-
Method Details
-
getMotd
Gets the MoTD.- Returns:
- the motd
-
setMotd
Sets the MoTD.- Parameters:
motd
- the motd
-
getGametype
Gets the gametype.- Returns:
- the gametype
-
setGametype
Sets the gametype.- Parameters:
gametype
- the gametype
-
getMap
Gets the map.- Returns:
- the map
-
setMap
Sets the map.- Parameters:
map
- the map
-
getNumPlayers
Gets the number of players.- Returns:
- the number of players
-
setNumPlayers
Sets the number of players.- Parameters:
numPlayers
- the number of players
-
setNumPlayers
public void setNumPlayers(int numPlayers) Sets the number of players. This method is just an overload forsetNumPlayers(String)
.- Parameters:
numPlayers
- the number of players
-
getMaxPlayers
Gets the max number of players.- Returns:
- the max number of players
-
setMaxPlayers
Sets the max number of players.- Parameters:
maxPlayers
- the max number of players
-
setMaxPlayers
public void setMaxPlayers(int maxPlayers) Sets the max number of players. This method is just an overload forsetMaxPlayers(String)
- Parameters:
maxPlayers
- the max number of players
-
write
Description copied from interface:Writeable
Writes into aBinaryWriter
.
-