Class FullQueryResponse

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

public class FullQueryResponse extends Object implements Writeable
A full query response containing a dynamic set of responses.
  • Constructor Details

    • FullQueryResponse

      public FullQueryResponse()
      Creates a new full query response with default values set.
  • Method Details

    • put

      public void put(@NotNull @NotNull QueryKey key, @NotNull @NotNull String value)
      Puts a key-value mapping into the response.
      Parameters:
      key - the key
      value - the value
    • put

      public void put(@NotNull @NotNull String key, @NotNull @NotNull String value)
      Puts a key-value mapping into the response.
      Parameters:
      key - the key
      value - the value
    • getKeyValuesMap

      @NotNull public @NotNull Map<String,String> getKeyValuesMap()
      Gets the map containing the key-value mappings.
      Returns:
      the map
    • setKeyValuesMap

      public void setKeyValuesMap(@NotNull @NotNull Map<String,String> map)
      Sets the map containing the key-value mappings.
      Parameters:
      map - the map
    • addPlayers

      public void addPlayers(@NotNull @NotNull String @NotNull ... players)
      Adds some players to the response.
      Parameters:
      players - the players
    • addPlayers

      public void addPlayers(@NotNull @NotNull Collection<String> players)
      Adds some players to the response.
      Parameters:
      players - the players
    • getPlayers

      @NotNull public @NotNull List<String> getPlayers()
      Gets the list of players.
      Returns:
      the list
    • setPlayers

      public void setPlayers(@NotNull @NotNull List<String> players)
      Sets the list of players.
      Parameters:
      players - the players
    • generatePluginsValue

      public static String generatePluginsValue()
      Generates the default plugins value. That being the server name and version followed by the name and version for each extension.
      Returns:
      the string result
    • 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