Class ServerStatus
java.lang.Object
net.minecraft.network.protocol.status.ServerStatus
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Componentprivate booleanprivate Stringstatic final intstatic final intprivate ServerStatusPingprivate Stringprivate Semaphoreprivate ServerStatus.Playersprivate ServerStatus.Version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetJson()Returns this object as a Json string.voidInvalidates the cached json, causing the next call to getJson to rebuild it.voidsetDescription(Component p_134909_) voidsetEnforcesSecureChat(boolean p_242968_) voidsetFavicon(String p_134907_) voidsetForgeData(ServerStatusPing data) voidsetPlayers(ServerStatus.Players p_134911_) voidsetVersion(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
-
enforcesSecureChat
private boolean enforcesSecureChat -
forgeData
-
mutex
-
json
-
-
Constructor Details
-
ServerStatus
public ServerStatus()
-
-
Method Details
-
getForgeData
-
setForgeData
-
getDescription
-
setDescription
-
getPlayers
-
setPlayers
-
getVersion
-
setVersion
-
setFavicon
-
getFavicon
-
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.
-