mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 06:41:31 +01:00
Fix
This commit is contained in:
parent
00f17cacf7
commit
317ea3ff1b
@ -11,7 +11,6 @@ import net.silentclient.client.gui.elements.IconButton;
|
||||
import net.silentclient.client.gui.elements.Input;
|
||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||
import net.silentclient.client.gui.minecraft.GuiConnecting;
|
||||
import net.silentclient.client.gui.theme.Theme;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.NotificationUtils;
|
||||
@ -63,7 +62,7 @@ public class DirectConnectGui extends SilentScreen {
|
||||
this.serverData.serverIP = this.silentInputs.get(0).getValue().trim();
|
||||
this.mc.gameSettings.lastServer = this.silentInputs.get(0).getValue().trim();
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(new GuiConnecting(parentScreen, this.mc, new ServerData(serverData.serverName, serverData.serverIP, false)));
|
||||
this.parentScreen.connect(new ServerData(serverData.serverName, serverData.serverIP, false));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -160,10 +160,18 @@ public class SilentMultiplayerGui extends SilentScreen {
|
||||
public void connectToSelected() {
|
||||
ServerData server = savedServerList.getServerData(selectedServer);
|
||||
if(server != null) {
|
||||
this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, new ServerData(server.serverName, server.serverIP, false)));
|
||||
this.connect(new ServerData(server.serverName, server.serverIP, false));
|
||||
}
|
||||
}
|
||||
|
||||
public void connect(ServerData serverData) {
|
||||
if(this.mc.theWorld != null) {
|
||||
this.mc.theWorld.sendQuittingDisconnectingPacket();
|
||||
this.mc.loadWorld(null);
|
||||
}
|
||||
this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, serverData));
|
||||
}
|
||||
|
||||
public boolean canUpSwap(int index)
|
||||
{
|
||||
return index > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user