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 index 0516462..753fced 100644 --- a/Client/src/main/java/com/baseband/client/feature/command/Connect.java +++ b/Client/src/main/java/com/baseband/client/feature/command/Connect.java @@ -2,6 +2,7 @@ package com.baseband.client.feature.command; import com.baseband.client.feature.Feature; import com.baseband.client.feature.category.Command; +import com.baseband.client.util.misc.GlobalUtil; import net.minecraft.client.multiplayer.GuiConnecting; @Command @@ -13,8 +14,13 @@ public class Connect extends Feature { @Override public void onCommand(String[] args) { - if(args.length == 1 && notIngame()) { - mc.displayGuiScreen(new GuiConnecting(mc.currentScreen, mc, args[0], 25565)); + 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)); + } catch (NumberFormatException e) { + GlobalUtil.LOGGER.warn("Port invalid"); + } } } } diff --git a/Client/src/main/java/com/baseband/client/feature/render/Bright.java b/Client/src/main/java/com/baseband/client/feature/render/Bright.java index e686e71..f23918b 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/Bright.java +++ b/Client/src/main/java/com/baseband/client/feature/render/Bright.java @@ -13,18 +13,16 @@ public class Bright extends Feature { return "Bright"; } - @Config("Mode") - public Mode mode = Mode.Gamma; + public Mode mode = Mode.Effect; public enum Mode { - Potion, - Gamma + Effect, + Gamma, } @Override public void onEveryTick() { - //Hot if (enabled && !notIngame()) { text = this + "ยง7 [" + mode.toString() + "]"; } else { @@ -37,8 +35,10 @@ public class Bright extends Feature { switch (mode) { case Gamma: mc.gameSettings.gammaSetting = 100f; - case Potion: + break; + case Effect: mc.player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 20 * 60, 0, true, false)); + break; } } diff --git a/Client/src/main/java/com/baseband/client/feature/render/HUD.java b/Client/src/main/java/com/baseband/client/feature/render/HUD.java index 57d1d0c..7b02547 100644 --- a/Client/src/main/java/com/baseband/client/feature/render/HUD.java +++ b/Client/src/main/java/com/baseband/client/feature/render/HUD.java @@ -63,7 +63,7 @@ public class HUD extends Feature { } public static void notify(String text) { - notify(text, 5000); + notify(text, 10000); } public static void notify(String text, int time) {