public static interface ClientPingServerEvent.Response extends StatusResponse
Modifier and Type | Interface and Description |
---|---|
static interface |
ClientPingServerEvent.Response.Players
Represents the information about the players on the server, sent after
the
ClientPingServerEvent . |
Modifier and Type | Method and Description |
---|---|
Optional<ClientPingServerEvent.Response.Players> |
getPlayers()
Gets player count and the list of players currently playing on the
server.
|
void |
setDescription(Text description)
Sets the description (MOTD) of the status response.
|
void |
setFavicon(Favicon favicon)
Sets the
Favicon to display on the client. |
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.
|
getDescription, getFavicon, getVersion
void setDescription(Text description)
description
- The description to displayOptional<ClientPingServerEvent.Response.Players> getPlayers()
StatusResponse
getPlayers
in interface StatusResponse
Optional.absent()
if not
availablevoid setHidePlayers(boolean hide)
getPlayers()
if the players were previously hidden.
Use getPlayers()
.isPresent()
to
check if the players are already hidden.
In Vanilla, this will display ???
instead of the player count in
the server list.
hide
- True
if the players should be hidden