diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index c1a9309..0f5a26c 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -71,7 +71,7 @@ public class CommandCore { public void move (Vec3d position) { final ClientWorld world = client.world; - if (world == null) return; + if (world == null || noPos == null) return; final DimensionType dimension = world.getDimension(); @@ -125,6 +125,8 @@ public class CommandCore { } public void incrementCurrentBlock () { + if (withPos == null) return; + final BlockPos start = withPos.start; final BlockPos end = withPos.end; @@ -158,6 +160,8 @@ public class CommandCore { public void run (String command) { final ClientConnection connection = client.getNetworkHandler().getConnection(); + if (block == null) return; + if (KaboomCheck.INSTANCE.isKaboom) { connection.send( new UpdateCommandBlockC2SPacket( @@ -199,6 +203,8 @@ public class CommandCore { public CompletableFuture runTracked (String command) { final ClientConnection connection = client.getNetworkHandler().getConnection(); + if (block == null) return new CompletableFuture<>(); + if (KaboomCheck.INSTANCE.isKaboom) { connection.send( new UpdateCommandBlockC2SPacket(