From df553029f9264c72398783600cdc1ce73ce9393e Mon Sep 17 00:00:00 2001 From: noil Date: Sat, 6 Mar 2021 09:22:57 -0500 Subject: [PATCH] ElytraFly: Add value for disabling NoHunger --- .../impl/module/movement/ElytraFlyModule.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java index 2bfba3c..3781274 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java @@ -51,6 +51,7 @@ public final class ElytraFlyModule extends Module { public final Value stayAirborneDisable = new Value("StayAirborneDisable", new String[]{"AutoDisableStayAirborne", "StayAirborneAutoDisable", "Stay-Airborne-Disable", "DisableStayInAir", "adsa", "dsa", "sad"}, "Automatically disables StayAirborne when touching the ground.", true); public final Value stayAirborneDelay = new Value("StayAirborneDelay", new String[]{"StayAirborneWait", "Stay-Airborne-Delay", "sadelay"}, "Delay(ms) between stay-airborne attempts.", 100.0f, 0.0f, 400.0f, 5.0f); public final Value disableInLiquid = new Value("DisableInLiquid", new String[]{"DisableInWater", "DisableInLava", "disableliquid", "liquidoff", "noliquid", "dil"}, "Disables all elytra flight when the player is in contact with liquid.", false); + public final Value disableNoHunger = new Value("DisableNoHunger", new String[]{"NoHunger", "Hunger", "DNH"}, "Automatically disables the 'NoHunger' module.", true); public final Value infiniteDurability = new Value("InfiniteDurability", new String[]{"InfiniteDura", "dura", "inf", "infdura"}, "Enables an old exploit that sends the start elytra-flying packet each tick.", false); public final Value noKick = new Value("NoKick", new String[]{"AntiKick", "Kick", "nk"}, "Bypass the server kicking you for flying while in elytra flight (Only works for Packet mode!).", true); @@ -65,10 +66,13 @@ public final class ElytraFlyModule extends Module { @Override public void onEnable() { super.onEnable(); - final NoHungerModule nohunger = (NoHungerModule) Seppuku.INSTANCE.getModuleManager().find(NoHungerModule.class); - if (nohunger != null && nohunger.isEnabled()) { - nohunger.toggle(); - Seppuku.INSTANCE.logChat("Toggled \247c" + nohunger.getDisplayName() + "\247r as it conflicts with \2477" + this.getDisplayName()); + + if (this.disableNoHunger.getValue()) { + final NoHungerModule nohunger = (NoHungerModule) Seppuku.INSTANCE.getModuleManager().find(NoHungerModule.class); + if (nohunger != null && nohunger.isEnabled()) { + nohunger.toggle(); + Seppuku.INSTANCE.logChat("Toggled \247c" + nohunger.getDisplayName() + "\247r as it conflicts with \2477" + this.getDisplayName()); + } } }