diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/Protocol1_21To1_21_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/Protocol1_21To1_21_2.java index 51dd1628a..7dc6c761a 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/Protocol1_21To1_21_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/Protocol1_21To1_21_2.java @@ -172,7 +172,8 @@ public final class Protocol1_21To1_21_2 extends AbstractProtocol wrapper.user().get(BundleStateTracker.class).toggleBundling()); registerServerbound(ServerboundPackets1_21_2.PONG, wrapper -> { final int id = wrapper.passthrough(Types.INT); // id - if (wrapper.user().get(PlayerPositionStorage.class).checkPong(id)) { + final PlayerPositionStorage playerPositionStorage = wrapper.user().get(PlayerPositionStorage.class); + if (playerPositionStorage != null && playerPositionStorage.checkPong(id)) { wrapper.cancel(); } }); @@ -234,13 +235,17 @@ public final class Protocol1_21To1_21_2 extends AbstractProtocol { final PlayerPositionStorage playerPositionStorage = wrapper.user().get(PlayerPositionStorage.class); - if (playerPositionStorage.checkHasPlayerPosition()) { + if (playerPositionStorage != null && playerPositionStorage.checkHasPlayerPosition()) { // Send move player after accept teleportation wrapper.sendToServer(Protocol1_21To1_21_2.class); wrapper.cancel();