forked from RepoMirrors/kami-blue
Fix a NPE bug when joining
Sometimes AntiForceLook tried to adjust packets using a nonexistant player while joining.
This commit is contained in:
parent
174297962d
commit
d6f789f305
|
@ -14,6 +14,7 @@ public class AntiForceLook extends Module {
|
|||
|
||||
@EventHandler
|
||||
Listener<PacketEvent.Receive> receiveListener = new Listener<>(event -> {
|
||||
if (mc.player == null) return;
|
||||
if (event.getPacket() instanceof SPacketPlayerPosLook) {
|
||||
SPacketPlayerPosLook packet = (SPacketPlayerPosLook) event.getPacket();
|
||||
packet.yaw = mc.player.rotationYaw;
|
||||
|
|
Loading…
Reference in New Issue