fix: assert player != null

This commit is contained in:
əlemi 2023-03-12 00:15:40 +01:00
parent 8baa0f2a64
commit d68a0727fb
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -59,7 +59,7 @@ public class Immovable extends AbstractModule {
event.setCanceled(true);
}
if (event.packet instanceof SEntityVelocityPacket && this.server.get()) {
if (MC.player != null && event.packet instanceof SEntityVelocityPacket && this.server.get()) {
SEntityVelocityPacket packet = (SEntityVelocityPacket) event.packet;
if (packet.getId() == MC.player.getId()) {
event.setCanceled(true);