Search in sources :

Example 1 with ServerList

use of net.minecraft.client.multiplayer.ServerList in project Hyperium by HyperiumClient.

the class HyperiumServerList method saveSingleServer.

public static void saveSingleServer(ServerData serverData) {
    ServerList serverlist = new ServerList(Minecraft.getMinecraft());
    serverlist.loadServerList();
    for (int i = 0; i < serverlist.countServers(); ++i) {
        ServerData serverdata = serverlist.getServerData(i);
        if (serverdata.serverName.equals(serverData.serverName) && serverdata.serverIP.equals(serverData.serverIP)) {
            serverlist.func_147413_a(i, serverData);
            break;
        }
    }
    serverlist.saveServerList();
}
Also used : ServerData(net.minecraft.client.multiplayer.ServerData) ServerList(net.minecraft.client.multiplayer.ServerList)

Aggregations

ServerData (net.minecraft.client.multiplayer.ServerData)1 ServerList (net.minecraft.client.multiplayer.ServerList)1