use of net.minecraft.client.gui.ServerListEntryLanDetected in project Wurst-MC-1.12 by Wurst-Imperium.
the class ServerHook method updateLastServerFromServerlist.
public static void updateLastServerFromServerlist(IGuiListEntry entry, GuiMultiplayer guiMultiplayer) {
if (entry instanceof ServerListEntryNormal) {
currentServerIP = ((ServerListEntryNormal) entry).getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = (ServerListEntryNormal) (guiMultiplayer.serverListSelector.getSelected() < 0 ? null : guiMultiplayer.serverListSelector.getListEntry(guiMultiplayer.serverListSelector.getSelected()));
} else if (entry instanceof ServerListEntryLanDetected) {
currentServerIP = ((ServerListEntryLanDetected) entry).getServerData().getServerIpPort();
lastServer = new ServerListEntryNormal(guiMultiplayer, new ServerData("LAN-Server", currentServerIP, false));
}
}
use of net.minecraft.client.gui.ServerListEntryLanDetected in project Wurst-MC-1.9 by Wurst-Imperium.
the class ServerHook method updateLastServerFromServerlist.
public static void updateLastServerFromServerlist(IGuiListEntry entry, GuiMultiplayer guiMultiplayer) {
if (entry instanceof ServerListEntryNormal) {
currentServerIP = ((ServerListEntryNormal) entry).getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = (ServerListEntryNormal) (guiMultiplayer.serverListSelector.getSelectedServer() < 0 ? null : guiMultiplayer.serverListSelector.getListEntry(guiMultiplayer.serverListSelector.getSelectedServer()));
} else if (entry instanceof ServerListEntryLanDetected) {
currentServerIP = ((ServerListEntryLanDetected) entry).getLanServer().getServerIpPort();
lastServer = new ServerListEntryNormal(guiMultiplayer, new ServerData("LAN-Server", currentServerIP, false));
}
}
use of net.minecraft.client.gui.ServerListEntryLanDetected in project Wurst-MC-1.12-OF by Wurst-Imperium.
the class ServerHook method updateLastServerFromServerlist.
public static void updateLastServerFromServerlist(IGuiListEntry entry, GuiMultiplayer guiMultiplayer) {
if (entry instanceof ServerListEntryNormal) {
currentServerIP = ((ServerListEntryNormal) entry).getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = (ServerListEntryNormal) (guiMultiplayer.serverListSelector.getSelected() < 0 ? null : guiMultiplayer.serverListSelector.getListEntry(guiMultiplayer.serverListSelector.getSelected()));
} else if (entry instanceof ServerListEntryLanDetected) {
currentServerIP = ((ServerListEntryLanDetected) entry).getServerData().getServerIpPort();
lastServer = new ServerListEntryNormal(guiMultiplayer, new ServerData("LAN-Server", currentServerIP, false));
}
}
use of net.minecraft.client.gui.ServerListEntryLanDetected in project Wurst-MC-1.10 by Wurst-Imperium.
the class ServerHook method updateLastServerFromServerlist.
public static void updateLastServerFromServerlist(IGuiListEntry entry, GuiMultiplayer guiMultiplayer) {
if (entry instanceof ServerListEntryNormal) {
currentServerIP = ((ServerListEntryNormal) entry).getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = (ServerListEntryNormal) (guiMultiplayer.serverListSelector.getSelected() < 0 ? null : guiMultiplayer.serverListSelector.getListEntry(guiMultiplayer.serverListSelector.getSelected()));
} else if (entry instanceof ServerListEntryLanDetected) {
currentServerIP = ((ServerListEntryLanDetected) entry).getLanServer().getServerIpPort();
lastServer = new ServerListEntryNormal(guiMultiplayer, new ServerData("LAN-Server", currentServerIP, false));
}
}
use of net.minecraft.client.gui.ServerListEntryLanDetected in project Wurst-MC-1.11 by Wurst-Imperium.
the class ServerHook method updateLastServerFromServerlist.
public static void updateLastServerFromServerlist(IGuiListEntry entry, GuiMultiplayer guiMultiplayer) {
if (entry instanceof ServerListEntryNormal) {
currentServerIP = ((ServerListEntryNormal) entry).getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = (ServerListEntryNormal) (guiMultiplayer.serverListSelector.getSelected() < 0 ? null : guiMultiplayer.serverListSelector.getListEntry(guiMultiplayer.serverListSelector.getSelected()));
} else if (entry instanceof ServerListEntryLanDetected) {
currentServerIP = ((ServerListEntryLanDetected) entry).getServerData().getServerIpPort();
lastServer = new ServerListEntryNormal(guiMultiplayer, new ServerData("LAN-Server", currentServerIP, false));
}
}
Aggregations