public class ServerList
extends java.lang.Object
Constructor and Description |
---|
ServerList(Minecraft mcIn) |
Modifier and Type | Method and Description |
---|---|
void |
addServerData(ServerData server)
Adds the given ServerData instance to the list.
|
int |
countServers()
Counts the number of ServerData instances in the list.
|
ServerData |
getServerData(int index)
Gets the ServerData instance stored for the given index in the list.
|
void |
loadServerList()
Loads a list of servers from servers.dat, by running ServerData.getServerDataFromNBTCompound on each NBT compound
found in the "servers" tag list.
|
void |
removeServerData(int index)
Removes the ServerData instance stored for the given index in the list.
|
void |
saveServerList()
Runs getNBTCompound on each ServerData instance, puts everything into a "servers" NBT list and writes it to
servers.dat.
|
static void |
saveSingleServer(ServerData server) |
void |
set(int index,
ServerData server) |
void |
swapServers(int pos1,
int pos2)
Takes two list indexes, and swaps their order around.
|
public ServerList(Minecraft mcIn)
public void loadServerList()
public void saveServerList()
public ServerData getServerData(int index)
public void removeServerData(int index)
public void addServerData(ServerData server)
public int countServers()
public void swapServers(int pos1, int pos2)
public void set(int index, ServerData server)
public static void saveSingleServer(ServerData server)