Interface ServerStatus
public sealed interface ServerStatus
Server status data returned to during the status ping.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds immutable server status instances.static final recordA player entry shown in the status sample list.static final recordVersion information used in the status response. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerStatus.Builderbuilder()Creates a new server status builder.Gets the status description (also referred to as MOTD).booleanGets whether secure chat is enforced on this server.favicon()Gets the optional server favicon.intGets the maximum player count shown in the status response.intplayers()Gets the online player count shown in the status response.@Unmodifiable List<ServerStatus.SamplePlayer> Gets the sample player entries shown in the status response.Creates a builder initialized with this status.version()Gets the server version used in the status response.
-
Method Details
-
description
Gets the status description (also referred to as MOTD).- Returns:
- status description
- Since:
- 0.1.0
-
version
Gets the server version used in the status response.- Returns:
- server version
- Since:
- 0.1.0
-
favicon
-
maxPlayers
@Contract(pure=true) int maxPlayers()Gets the maximum player count shown in the status response.- Returns:
- displayed maximum player count
- Since:
- 0.1.0
-
players
@Contract(pure=true) int players()Gets the online player count shown in the status response.- Returns:
- displayed online player count
- Since:
- 0.1.0
-
samplePlayers
Gets the sample player entries shown in the status response.- Returns:
- unmodifiable sample player list
- Since:
- 0.1.0
-
enforceSecureChat
@Contract(pure=true) boolean enforceSecureChat()Gets whether secure chat is enforced on this server.- Returns:
trueif secure chat is enforced- Since:
- 0.1.0
-
toBuilder
Creates a builder initialized with this status.- Returns:
- new builder containing this status data
- Since:
- 0.1.0
-
builder
Creates a new server status builder.- Returns:
- new builder
- Since:
- 0.1.0
-