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
ConstructorsConstructorDescriptionCreates a new basic query response with pre-filled default values. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringGets the gametype.@NotNull StringgetMap()Gets the map.@NotNull StringGets the max number of players.@NotNull StringgetMotd()Gets the MoTD.@NotNull StringGets the number of players.voidsetGametype(@NotNull String gametype) Sets the gametype.voidSets the map.voidsetMaxPlayers(int maxPlayers) Sets the max number of players.voidsetMaxPlayers(@NotNull String maxPlayers) Sets the max number of players.voidSets the MoTD.voidsetNumPlayers(int numPlayers) Sets the number of players.voidsetNumPlayers(@NotNull String numPlayers) Sets the number of players.voidwrite(@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:WriteableWrites into aBinaryWriter.
-