Interface ClientPingServerEvent.Response

All Superinterfaces:
StatusResponse
Enclosing interface:
ClientPingServerEvent

public static interface ClientPingServerEvent.Response extends StatusResponse
Represents a mutable response to a status request.
  • Method Details

    • setDescription

      void setDescription(Component description)
      Sets the description (MOTD) of the status response.
      Parameters:
      description - The description to display
    • players

      Description copied from interface: StatusResponse
      Gets player count and the list of players currently playing on the server.
      Specified by:
      players in interface StatusResponse
      Returns:
      The player information, or Optional.empty() if not available
    • setHidePlayers

      void setHidePlayers(boolean hide)
      Sets whether the player count and the list of players on this server is hidden and doesn't get sent to the client. This will restore players() if the players were previously hidden.

      Use players().isPresent() to check if the players are already hidden.

      In Vanilla, this will display ??? instead of the player count in the server list.

      Parameters:
      hide - True if the players should be hidden
    • version

      Description copied from interface: StatusResponse
      Gets the version of the server displayed when the client or the server are outdated.
      Specified by:
      version in interface StatusResponse
      Returns:
      The server version
    • setFavicon

      void setFavicon(@Nullable Favicon favicon)
      Sets the Favicon to display on the client.
      Parameters:
      favicon - The favicon, or null for none