Package net.minecraft.network
Class ServerStatusResponse
- java.lang.Object
-
- net.minecraft.network.ServerStatusResponse
-
public class ServerStatusResponse extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerStatusResponse.Players
static class
ServerStatusResponse.Serializer
static class
ServerStatusResponse.Version
-
Field Summary
Fields Modifier and Type Field Description private ITextComponent
description
private java.lang.String
favicon
private FMLStatusPing
forgeData
private java.lang.String
json
private java.util.concurrent.Semaphore
mutex
private ServerStatusResponse.Players
players
private ServerStatusResponse.Version
version
-
Constructor Summary
Constructors Constructor Description ServerStatusResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITextComponent
getDescription()
java.lang.String
getFavicon()
FMLStatusPing
getForgeData()
java.lang.String
getJson()
Returns this object as a Json string.ServerStatusResponse.Players
getPlayers()
ServerStatusResponse.Version
getVersion()
void
invalidateJson()
Invalidates the cached json, causing the next call to getJson to rebuild it.void
setDescription(ITextComponent p_151315_1_)
void
setFavicon(java.lang.String p_151320_1_)
void
setForgeData(FMLStatusPing data)
void
setPlayers(ServerStatusResponse.Players p_151319_1_)
void
setVersion(ServerStatusResponse.Version p_151321_1_)
-
-
-
Field Detail
-
description
private ITextComponent description
-
players
private ServerStatusResponse.Players players
-
version
private ServerStatusResponse.Version version
-
favicon
private java.lang.String favicon
-
forgeData
private transient FMLStatusPing forgeData
-
mutex
private java.util.concurrent.Semaphore mutex
-
json
private java.lang.String json
-
-
Method Detail
-
getForgeData
public FMLStatusPing getForgeData()
-
setForgeData
public void setForgeData(FMLStatusPing data)
-
getDescription
public ITextComponent getDescription()
-
setDescription
public void setDescription(ITextComponent p_151315_1_)
-
getPlayers
public ServerStatusResponse.Players getPlayers()
-
setPlayers
public void setPlayers(ServerStatusResponse.Players p_151319_1_)
-
getVersion
public ServerStatusResponse.Version getVersion()
-
setVersion
public void setVersion(ServerStatusResponse.Version p_151321_1_)
-
setFavicon
public void setFavicon(java.lang.String p_151320_1_)
-
getFavicon
public java.lang.String getFavicon()
-
getJson
public java.lang.String 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 network 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.
-
-