From d6f789f30517545335252f1da424cbbd7ba9396f Mon Sep 17 00:00:00 2001 From: Ridan Vandenbergh Date: Thu, 21 Nov 2019 23:57:12 +0100 Subject: [PATCH] Fix a NPE bug when joining Sometimes AntiForceLook tried to adjust packets using a nonexistant player while joining. --- .../zeroeightsix/kami/module/modules/player/AntiForceLook.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/player/AntiForceLook.java b/src/main/java/me/zeroeightsix/kami/module/modules/player/AntiForceLook.java index 22e3e492..21b5dbcd 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/player/AntiForceLook.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/player/AntiForceLook.java @@ -14,6 +14,7 @@ public class AntiForceLook extends Module { @EventHandler Listener receiveListener = new Listener<>(event -> { + if (mc.player == null) return; if (event.getPacket() instanceof SPacketPlayerPosLook) { SPacketPlayerPosLook packet = (SPacketPlayerPosLook) event.getPacket(); packet.yaw = mc.player.rotationYaw;