Interface StatusResponse

All Known Subinterfaces:
ClientPingServerEvent.Response

public interface StatusResponse
Represents the response to a status request. Unlike ClientPingServerEvent this is immutable.

This interface exists mostly for convenience and can be implemented in a library pinging other servers for example.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents the player count, slots and a list of players current playing on a server.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the description (MOTD) of the status response.
    Gets the Favicon of the server.
    Gets player count and the list of players currently playing on the server.
    Gets the version of the server displayed when the client or the server are outdated.
  • Method Details

    • description

      Component description()
      Gets the description (MOTD) of the status response.
      Returns:
      The description to display
    • players

      Optional<? extends StatusResponse.Players> players()
      Gets player count and the list of players currently playing on the server.
      Returns:
      The player information, or Optional.empty() if not available
    • version

      MinecraftVersion version()
      Gets the version of the server displayed when the client or the server are outdated.
      Returns:
      The server version
    • favicon

      Optional<Favicon> favicon()
      Gets the Favicon of the server.
      Returns:
      The favicon, or Optional.empty() if not available