Interface StatusResponse
-
- All Known Subinterfaces:
ClientPingServerEvent.Response
public interface StatusResponse
Represents the response to a status request. UnlikeClientPingServerEvent
this is immutable.This interface exists mostly for convenience and can be implemented in a library pinging other servers for example.
- See Also:
ClientPingServerEvent
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
StatusResponse.Players
Represents the player count, slots and a list of players current playing on a server.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Component
description()
Gets the description (MOTD) of the status response.Optional<Favicon>
favicon()
Gets theFavicon
of the server.Optional<? extends StatusResponse.Players>
players()
Gets player count and the list of players currently playing on the server.MinecraftVersion
version()
Gets the version of the server displayed when the client or the server are outdated.
-
-
-
Method Detail
-
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 theFavicon
of the server.- Returns:
- The favicon, or
Optional.empty()
if not available
-
-