net.minecraft.client.gui.GuiMultiplayer Java Examples
The following examples show how to use
net.minecraft.client.gui.GuiMultiplayer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MixinGuiDownloadTerrain.java From LiquidBounce with GNU General Public License v3.0 | 7 votes |
@Override protected void injectedActionPerformed(GuiButton button) { if (button.id == 0) { boolean flag = this.mc.isIntegratedServerRunning(); boolean flag1 = this.mc.isConnectedToRealms(); button.enabled = false; this.mc.theWorld.sendQuittingDisconnectingPacket(); this.mc.loadWorld(null); if (flag) { this.mc.displayGuiScreen(new GuiMainMenu()); } else if (flag1) { RealmsBridge realmsbridge = new RealmsBridge(); realmsbridge.switchToRealms(new GuiMainMenu()); } else { this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu())); } } }
Example #2
Source File: DisconnectCommand.java From seppuku with GNU General Public License v3.0 | 6 votes |
@Override public void exec(String input) { if (!this.clamp(input, 1, 1)) { this.printUsage(); return; } final Minecraft mc = Minecraft.getMinecraft(); boolean flag = mc.isIntegratedServerRunning(); boolean flag1 = mc.isConnectedToRealms(); mc.world.sendQuittingDisconnectingPacket(); mc.loadWorld(null); if (flag) { mc.displayGuiScreen(new GuiMainMenu()); } else if (flag1) { RealmsBridge realmsbridge = new RealmsBridge(); realmsbridge.switchToRealms(new GuiMainMenu()); } else { mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu())); } }
Example #3
Source File: MixinGuiDownloadTerrain.java From LiquidBounce with GNU General Public License v3.0 | 6 votes |
@Override protected void injectedActionPerformed(GuiButton button) { if (button.id == 0) { boolean flag = this.mc.isIntegratedServerRunning(); boolean flag1 = this.mc.isConnectedToRealms(); button.enabled = false; this.mc.theWorld.sendQuittingDisconnectingPacket(); this.mc.loadWorld(null); if (flag) { this.mc.displayGuiScreen(new GuiMainMenu()); } else if (flag1) { RealmsBridge realmsbridge = new RealmsBridge(); realmsbridge.switchToRealms(new GuiMainMenu()); } else { this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu())); } } }
Example #4
Source File: GuiConfirmDisconnect.java From Hyperium with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void actionPerformed(GuiButton button) { switch (button.id) { case 0: boolean integratedServerRunning = mc.isIntegratedServerRunning(); button.enabled = false; mc.theWorld.sendQuittingDisconnectingPacket(); mc.loadWorld(null); Hyperium.INSTANCE.getHandlers().getGuiDisplayHandler().setDisplayNextTick(integratedServerRunning ? new GuiMainMenu() : new GuiMultiplayer(new GuiMainMenu())); break; case 1: mc.displayGuiScreen(null); break; } }
Example #5
Source File: ServerUtils.java From LiquidBounce with GNU General Public License v3.0 | 4 votes |
public static void connectToLastServer() { if(serverData == null) return; mc.displayGuiScreen(new GuiConnecting(new GuiMultiplayer(new GuiMainMenu()), mc, serverData)); }