From 268e22707d78dd5e2d69c680502a3b86f194ab09 Mon Sep 17 00:00:00 2001 From: Qther Date: Mon, 2 Mar 2020 23:20:04 +0800 Subject: [PATCH] probably fixes the crash --- .../zeroeightsix/kami/module/modules/combat/AutoTrap.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTrap.java b/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTrap.java index 5e8ba225..0902a7c8 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTrap.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTrap.java @@ -83,7 +83,7 @@ public class AutoTrap extends Module { @Override protected void onEnable() { - if (mc.player == null) return; + if (mc.player == null || mc.player.getHealth() <= 0) return; firstRun = true; @@ -95,7 +95,7 @@ public class AutoTrap extends Module { @Override protected void onDisable() { - if (mc.player == null) return; + if (mc.player == null || mc.player.getHealth() <= 0) return; if (lastHotbarSlot != playerHotbarSlot && playerHotbarSlot != -1) { mc.player.inventory.currentItem = playerHotbarSlot; @@ -114,7 +114,7 @@ public class AutoTrap extends Module { @Override public void onUpdate() { - if (mc.player == null) return; + if (mc.player == null || mc.player.getHealth() <= 0) return; if (!activeInFreecam.getValue() && ModuleManager.isModuleEnabled("Freecam")) return;