diff --git a/src/main/java/com/gamesense/client/module/modules/combat/Criticals.java b/src/main/java/com/gamesense/client/module/modules/combat/Criticals.java index 90b6bf8c5..80abdce5c 100644 --- a/src/main/java/com/gamesense/client/module/modules/combat/Criticals.java +++ b/src/main/java/com/gamesense/client/module/modules/combat/Criticals.java @@ -32,8 +32,10 @@ public class Criticals extends Module { @EventHandler private final Listener listener = new Listener<>(event -> { - if (event.getPacket() instanceof CPacketUseEntity) { - if (((CPacketUseEntity) event.getPacket()).getAction() == CPacketUseEntity.Action.ATTACK && packet.getEntityFromWorld((World)this.mc.world) instanceof EntityLivingBase && mc.player.onGround) { + if (PacketEvent.getPacket() instanceof CPacketUseEntity) { + packet = (CPacketUseEntity)PacketEvent.getPacket(); + if (((CPacketUseEntity) PacketEvent.getPacket()).getAction() == CPacketUseEntity.Action.ATTACK && packet.getEntityFromWorld((World)this.mc.world) instanceof EntityLivingBase && + mc.player.onGround && !mc.player.isInLava() && !mc.player.isInWater()) { switch (critMode.getValue()) { case "Jump": { mc.player.jump();