This commit is contained in:
parent
465e2be922
commit
9ff2b22257
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ package de.com.baseband.client.feature.commands;
|
|||
import de.com.baseband.client.feature.Feature;
|
||||
import de.com.baseband.client.feature.category.Command;
|
||||
import de.com.baseband.prod.LoadHandler;
|
||||
import net.minecraft.client.multiplayer.GuiConnecting;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
import static de.com.baseband.client.BaseBand.LOGGER;
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class Connect extends Feature {
|
|||
if((args.length == 1 || args.length == 2) && notIngame()) {
|
||||
assert mc.currentScreen != null; // notIngame => in a menu => gui is not null
|
||||
try {
|
||||
mc.displayGuiScreen(new GuiConnecting(mc.currentScreen, mc, args[0], args.length == 2 ? Integer.parseInt(args[1]) : 25565));
|
||||
FMLClientHandler.instance().connectToServerAtStartup(args[0], args.length == 2 ? Integer.parseInt(args[1]) : 25565);
|
||||
} catch (NumberFormatException e) {
|
||||
LOGGER.warn("Port invalid");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue