From a3c1ad3ec84c11b3b106f861184b553e216e26e1 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 30 Nov 2016 16:10:08 +1100 Subject: [PATCH] Fixes #1449 --- .../bukkit/util/block/BukkitLocalQueue_1_7.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java index 05b611e7c..d55ae2fd7 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java @@ -112,12 +112,14 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue { int y = MainUtil.y_loc[i][j]; int z = MainUtil.z_loc[i][j]; PlotBlock newBlock = result2[j]; - if (newBlock.id == -1) { - chunk.getBlock(x, y, z).setData(newBlock.data, false); - continue; + if (newBlock != null) { + if (newBlock.id == -1) { + chunk.getBlock(x, y, z).setData(newBlock.data, false); + continue; + } + Object block = this.methodGetById.call(newBlock.id); + this.methodA.of(c).call(x, y, z, block, newBlock.data); } - Object block = this.methodGetById.call(newBlock.id); - this.methodA.of(c).call(x, y, z, block, newBlock.data); } } fixChunkLighting(lc.getX(), lc.getZ());