Class ServerStatus
java.lang.Object
net.minecraft.network.protocol.status.ServerStatus
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate Component
private String
static final int
static final int
private ServerStatusPing
private String
private Semaphore
private ServerStatus.Players
private ServerStatus.Version
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetJson()
Returns this object as a Json string.void
Invalidates the cached json, causing the next call to getJson to rebuild it.void
setDescription
(Component p_134909_) void
setFavicon
(String p_134907_) void
setForgeData
(ServerStatusPing data) void
setPlayers
(ServerStatus.Players p_134911_) void
setVersion
(ServerStatus.Version p_134913_)
-
Field Details
-
FAVICON_WIDTH
public static final int FAVICON_WIDTH- See Also:
-
FAVICON_HEIGHT
public static final int FAVICON_HEIGHT- See Also:
-
description
-
players
-
version
-
favicon
-
forgeData
-
mutex
-
json
-
-
Constructor Details
-
ServerStatus
public ServerStatus()
-
-
Method Details
-
getForgeData
-
setForgeData
-
getDescription
-
setDescription
-
getPlayers
-
setPlayers
-
getVersion
-
setVersion
-
setFavicon
-
getFavicon
-
getJson
Returns this object as a Json string. Converting to JSON if a cached version is not available. Also to prevent potentially large memory allocations on the server this is moved from the SPacketServerInfo writePacket function As this method is called from the impl threads so thread safety is important! -
invalidateJson
public void invalidateJson()Invalidates the cached json, causing the next call to getJson to rebuild it. This is needed externally because PlayerCountData.setPlayer's is public.
-