probably fixes the crash

This commit is contained in:
Qther 2020-03-02 23:20:04 +08:00 committed by GitHub
parent 7f41f23eba
commit 268e22707d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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;