public void handleErrorMessage(String par1Str, Object[] par2ArrayOfObj) { if (!this.disconnected) { this.disconnected = true; this.mc.loadWorld((WorldClient)null); if (this.field_98183_l != null) { this.mc.displayGuiScreen(new GuiScreenDisconnectedOnline(this.field_98183_l, "disconnect.lost", par1Str, par2ArrayOfObj)); } else { this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", par1Str, par2ArrayOfObj)); } } }
/** * Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination */ public void onDisconnect(IChatComponent p_147231_1_) { this.gameController.loadWorld((WorldClient)null); if (this.guiScreenServer != null) { this.gameController.displayGuiScreen(new GuiScreenDisconnectedOnline(this.guiScreenServer, "disconnect.lost", p_147231_1_)); } else { this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new HookGuiMainMenu()), "disconnect.lost", p_147231_1_)); } }
public void func_72492_a(Packet255KickDisconnect p_72492_1_) { this.field_72555_g.func_74424_a("disconnect.kicked", new Object[0]); this.field_72554_f = true; this.field_72563_h.func_71403_a((WorldClient)null); if(this.field_98183_l != null) { this.field_72563_h.func_71373_a(new GuiScreenDisconnectedOnline(this.field_98183_l, "disconnect.disconnected", "disconnect.genericReason", new Object[]{p_72492_1_.field_73631_a})); } else { this.field_72563_h.func_71373_a(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect.genericReason", new Object[]{p_72492_1_.field_73631_a})); } }
public void func_72515_a(String p_72515_1_, Object[] p_72515_2_) { if(!this.field_72554_f) { this.field_72554_f = true; this.field_72563_h.func_71403_a((WorldClient)null); if(this.field_98183_l != null) { this.field_72563_h.func_71373_a(new GuiScreenDisconnectedOnline(this.field_98183_l, "disconnect.lost", p_72515_1_, p_72515_2_)); } else { this.field_72563_h.func_71373_a(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", p_72515_1_, p_72515_2_)); } } }
public void run() { try { TaskOnlineConnect.func_96583_a(this.field_96594_c, new NetClientHandler(this.field_96594_c.func_96578_b(), this.field_96595_a, this.field_96593_b, TaskOnlineConnect.func_98172_a(this.field_96594_c))); if(this.field_96594_c.func_96577_c()) { return; } this.field_96594_c.func_96576_b(I18n.func_135053_a("mco.connect.authorizing")); TaskOnlineConnect.func_96580_a(this.field_96594_c).func_72552_c(new Packet2ClientProtocol(78, this.field_96594_c.func_96578_b().func_110432_I().func_111285_a(), this.field_96595_a, this.field_96593_b)); } catch (UnknownHostException var2) { if(this.field_96594_c.func_96577_c()) { return; } this.field_96594_c.func_96578_b().func_71373_a(new GuiScreenDisconnectedOnline(TaskOnlineConnect.func_98172_a(this.field_96594_c), "connect.failed", "disconnect.genericReason", new Object[]{"Unknown host \'" + this.field_96595_a + "\'"})); } catch (ConnectException var3) { if(this.field_96594_c.func_96577_c()) { return; } this.field_96594_c.func_96578_b().func_71373_a(new GuiScreenDisconnectedOnline(TaskOnlineConnect.func_98172_a(this.field_96594_c), "connect.failed", "disconnect.genericReason", new Object[]{var3.getMessage()})); } catch (Exception var4) { if(this.field_96594_c.func_96577_c()) { return; } var4.printStackTrace(); this.field_96594_c.func_96578_b().func_71373_a(new GuiScreenDisconnectedOnline(TaskOnlineConnect.func_98172_a(this.field_96594_c), "connect.failed", "disconnect.genericReason", new Object[]{var4.toString()})); } }
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect) { this.netManager.networkShutdown("disconnect.kicked", par1Packet255KickDisconnect.reason); this.disconnected = true; this.mc.loadWorld((WorldClient)null); if (this.field_98183_l != null) { this.mc.displayGuiScreen(new GuiScreenDisconnectedOnline(this.field_98183_l, "disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason})); } else { this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason})); } }