diff --git a/Client/src/main/java/com/baseband/client/Setup.java b/Client/src/main/java/com/baseband/client/Setup.java index 31bbdb3..fc42d4f 100644 --- a/Client/src/main/java/com/baseband/client/Setup.java +++ b/Client/src/main/java/com/baseband/client/Setup.java @@ -41,6 +41,8 @@ public class Setup { new ChatExtras(), new ChatFilter(), new ClickGUI(), + new Connect(), + new Disconnect(), new ElytraFly(), new ElytraBot(), new FastBreak(), diff --git a/Client/src/main/java/com/baseband/client/feature/command/Connect.java b/Client/src/main/java/com/baseband/client/feature/command/Connect.java new file mode 100644 index 0000000..0516462 --- /dev/null +++ b/Client/src/main/java/com/baseband/client/feature/command/Connect.java @@ -0,0 +1,20 @@ +package com.baseband.client.feature.command; + +import com.baseband.client.feature.Feature; +import com.baseband.client.feature.category.Command; +import net.minecraft.client.multiplayer.GuiConnecting; + +@Command +public class Connect extends Feature { + @Override + public String toString() { + return "Connect"; + } + + @Override + public void onCommand(String[] args) { + if(args.length == 1 && notIngame()) { + mc.displayGuiScreen(new GuiConnecting(mc.currentScreen, mc, args[0], 25565)); + } + } +} diff --git a/Client/src/main/java/com/baseband/client/feature/command/Disconnect.java b/Client/src/main/java/com/baseband/client/feature/command/Disconnect.java new file mode 100644 index 0000000..b1215d4 --- /dev/null +++ b/Client/src/main/java/com/baseband/client/feature/command/Disconnect.java @@ -0,0 +1,23 @@ +package com.baseband.client.feature.command; + +import com.baseband.client.feature.Feature; +import com.baseband.client.feature.category.Command; + +import net.minecraft.network.play.server.SPacketDisconnect; +import net.minecraft.util.text.TextComponentString; + +@Command +public class Disconnect extends Feature { + + @Override + public String toString() { + return "Disconnect"; + } + + @Override + public void onCommand(String[] args) { + if (mc.getConnection() != null) { + mc.getConnection().handleDisconnect(new SPacketDisconnect(new TextComponentString("[BaseBand] Disconnected."))); + } + } +}