From 96366aae42e22d954c47b69bb03464964a1d54bc Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sat, 23 Feb 2019 20:11:44 -0300 Subject: [PATCH] Fix NPE when block connection is disabled --- .../protocols/protocol1_13to1_12_2/packets/WorldPackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/WorldPackets.java index 63bbe1613..e5b223084 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/WorldPackets.java @@ -308,7 +308,7 @@ public class WorldPackets { } boolean willSaveConnection = false; - if (ConnectionData.needStoreBlocks() && Via.getConfig().isServersideBlockConnections()) { + if (Via.getConfig().isServersideBlockConnections() && ConnectionData.needStoreBlocks()) { for (int p = 0; p < section.getPaletteSize(); p++) { int newId = section.getPaletteEntry(p); if (ConnectionData.isWelcome(newId)) {