use of net.minecraft.client.gui.GuiMultiplayer in project Almura by AlmuraDev.
the class ServerMenu method onButtonClick.
@Subscribe
public void onButtonClick(UIButton.ClickEvent event) throws IOException, URISyntaxException {
if (!event.getComponent().getName().toLowerCase().equals("button.server.web") || (!event.getComponent().getName().toLowerCase().equals("button.server.map"))) {
// This doesn't close this screen when connecting to a server.
close();
}
switch(event.getComponent().getName().toLowerCase()) {
case "button.server.almura.live":
FMLClientHandler.instance().setupServerList();
FMLClientHandler.instance().connectToServer(this, DATA_LIVE_SERVER_CONNECT);
break;
case "button.server.almura.dev":
FMLClientHandler.instance().setupServerList();
FMLClientHandler.instance().connectToServer(this, DATA_DEV_SERVER_CONNECT);
break;
case "button.server.another":
mc.displayGuiScreen(new GuiMultiplayer(this));
break;
case "button.server.map":
Desktop.getDesktop().browse(new URI("http://srv1.almuramc.com:8123"));
break;
case "button.server.web":
Desktop.getDesktop().browse(new URI("http://www.almuramc.com"));
break;
}
}
Aggregations