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 boolean
private String
static final int
static final int
private ServerStatusPing
private String
private Semaphore
private ServerStatus.Players
private boolean
private ServerStatus.Version
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getJson()
Returns this object as a Json string.void
Invalidates the cached json, causing the next call to getJson to rebuild it.boolean
void
setDescription
(Component p_134909_) void
setEnforcesSecureChat
(boolean p_242968_) void
setFavicon
(String p_134907_) void
setForgeData
(ServerStatusPing data) void
setPlayers
(ServerStatus.Players p_134911_) void
setPreviewsChat
(boolean p_238079_) 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
-
previewsChat
private boolean previewsChat -
enforcesSecureChat
private boolean enforcesSecureChat -
forgeData
-
mutex
-
json
-
-
Constructor Details
-
ServerStatus
public ServerStatus()
-
-
Method Details
-
getForgeData
-
setForgeData
-
getDescription
-
setDescription
-
getPlayers
-
setPlayers
-
getVersion
-
setVersion
-
setFavicon
-
getFavicon
-
setPreviewsChat
public void setPreviewsChat(boolean p_238079_) -
previewsChat
public boolean previewsChat() -
setEnforcesSecureChat
public void setEnforcesSecureChat(boolean p_242968_) -
enforcesSecureChat
public boolean enforcesSecureChat() -
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.
-