public class ServerData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ServerData.ServerResourceMode |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
gameVersion
Game version for this server.
|
boolean |
pinged |
long |
pingToServer
last server ping that showed up in the server browser
|
java.lang.String |
playerList |
java.lang.String |
populationInfo
the string indicating number of players on and capacity of the server that is shown on the server browser (i.e.
|
java.lang.String |
serverIP |
java.lang.String |
serverMOTD
(better variable name would be 'hostname') server name as displayed in the server browser's second line (grey
text)
|
java.lang.String |
serverName |
int |
version |
Constructor and Description |
---|
ServerData(java.lang.String name,
java.lang.String ip,
boolean isLan) |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(ServerData serverDataIn) |
java.lang.String |
getBase64EncodedIconData()
Returns the base-64 encoded representation of the server's icon, or null if not available
|
NBTTagCompound |
getNBTCompound()
Returns an NBTTagCompound with the server's name, IP and maybe acceptTextures.
|
ServerData.ServerResourceMode |
getResourceMode() |
static ServerData |
getServerDataFromNBTCompound(NBTTagCompound nbtCompound)
Takes an NBTTagCompound with 'name' and 'ip' keys, returns a ServerData instance.
|
boolean |
isOnLAN()
Return true if the server is a LAN server
|
void |
setBase64EncodedIconData(java.lang.String icon) |
void |
setResourceMode(ServerData.ServerResourceMode mode) |
public java.lang.String serverName
public java.lang.String serverIP
public java.lang.String populationInfo
public java.lang.String serverMOTD
public long pingToServer
public int version
public java.lang.String gameVersion
public boolean pinged
public java.lang.String playerList
public ServerData(java.lang.String name, java.lang.String ip, boolean isLan)
public NBTTagCompound getNBTCompound()
public ServerData.ServerResourceMode getResourceMode()
public void setResourceMode(ServerData.ServerResourceMode mode)
public static ServerData getServerDataFromNBTCompound(NBTTagCompound nbtCompound)
public java.lang.String getBase64EncodedIconData()
public void setBase64EncodedIconData(java.lang.String icon)
public boolean isOnLAN()
public void copyFrom(ServerData serverDataIn)