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 Stringstatic final intstatic final intprivate ServerStatusPingprivate Stringprivate Semaphoreprivate ServerStatus.Playersprivate ServerStatus.Version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetJson()Returns this object as a Json string.voidInvalidates the cached json, causing the next call to getJson to rebuild it.voidsetDescription(Component p_134909_) 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
-
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.
-