summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
author alemi <me@alemi.dev>2023-03-12 00:15:40 +0100
committer alemi <me@alemi.dev>2023-03-12 00:15:40 +0100
commitd68a0727fb146de6c09811df86876365a6da6abd (patch)
treea52c8caf5026407cb27ac20dd94d71208cafe7e8 /src/main/java
parent8baa0f2a64e0039d0df7d168e30c03a22c60bfb4 (diff)
fix: assert player != null
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/Immovable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/ftbsc/bscv/modules/self/Immovable.java b/src/main/java/ftbsc/bscv/modules/self/Immovable.java
index b01a14e..b27b117 100644
--- a/src/main/java/ftbsc/bscv/modules/self/Immovable.java
+++ b/src/main/java/ftbsc/bscv/modules/self/Immovable.java
@@ -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);