Class BasicQueryResponse

java.lang.Object
net.minestom.server.extras.query.response.BasicQueryResponse
All Implemented Interfaces:
Writeable

public class BasicQueryResponse extends Object implements Writeable
A basic query response containing a fixed set of responses.
  • Constructor Details

    • BasicQueryResponse

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

    • getMotd

      @NotNull public @NotNull String getMotd()
      Gets the MoTD.
      Returns:
      the motd
    • setMotd

      public void setMotd(@NotNull @NotNull String motd)
      Sets the MoTD.
      Parameters:
      motd - the motd
    • getGametype

      @NotNull public @NotNull String getGametype()
      Gets the gametype.
      Returns:
      the gametype
    • setGametype

      public void setGametype(@NotNull @NotNull String gametype)
      Sets the gametype.
      Parameters:
      gametype - the gametype
    • getMap

      @NotNull public @NotNull String getMap()
      Gets the map.
      Returns:
      the map
    • setMap

      public void setMap(@NotNull @NotNull String map)
      Sets the map.
      Parameters:
      map - the map
    • getNumPlayers

      @NotNull public @NotNull String getNumPlayers()
      Gets the number of players.
      Returns:
      the number of players
    • setNumPlayers

      public void setNumPlayers(@NotNull @NotNull String numPlayers)
      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 for setNumPlayers(String).
      Parameters:
      numPlayers - the number of players
    • getMaxPlayers

      @NotNull public @NotNull String getMaxPlayers()
      Gets the max number of players.
      Returns:
      the max number of players
    • setMaxPlayers

      public void setMaxPlayers(@NotNull @NotNull String maxPlayers)
      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 for setMaxPlayers(String)
      Parameters:
      maxPlayers - the max number of players
    • write

      public void write(@NotNull @NotNull BinaryWriter writer)
      Description copied from interface: Writeable
      Writes into a BinaryWriter.
      Specified by:
      write in interface Writeable
      Parameters:
      writer - the writer to write to