Search in sources :

Example 1 with GuiWurstMainMenu

use of net.wurstclient.gui.main.GuiWurstMainMenu in project Wurst-MC-1.12 by Wurst-Imperium.

the class JoinCmd method execute.

@Override
public void execute(String[] args) throws CmdError {
    if (args.length != 1)
        syntaxError();
    Minecraft mc = Minecraft.getMinecraft();
    mc.addScheduledTask(() -> {
        mc.displayGuiScreen(new GuiConnecting(new GuiWurstMainMenu(), mc, new ServerData("", args[0], false)));
        System.out.println("Joined " + args[0] + " as " + mc.session.getUsername());
    });
}
Also used : GuiConnecting(net.minecraft.client.multiplayer.GuiConnecting) ServerData(net.minecraft.client.multiplayer.ServerData) GuiWurstMainMenu(net.wurstclient.gui.main.GuiWurstMainMenu) Minecraft(net.minecraft.client.Minecraft)

Aggregations

Minecraft (net.minecraft.client.Minecraft)1 GuiConnecting (net.minecraft.client.multiplayer.GuiConnecting)1 ServerData (net.minecraft.client.multiplayer.ServerData)1 GuiWurstMainMenu (net.wurstclient.gui.main.GuiWurstMainMenu)1