From 60cb5b5603c1114dbb199be471a8c046afdd0a7f Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 4 Apr 2016 17:15:02 +1000 Subject: [PATCH] SPIGOT-2118: Fix crash on chunk regen --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 86ce61f349..2be8a568d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -183,6 +183,10 @@ public class CraftWorld implements World { return false; } + return unloadChunk0(x, z, save, safe); + } + + private boolean unloadChunk0(int x, int z, boolean save, boolean safe) { net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z); if (chunk.mustSave) { // If chunk had previously been queued to save, must do save to avoid loss of that data save = true; @@ -217,7 +221,7 @@ public class CraftWorld implements World { } public boolean regenerateChunk(int x, int z) { - unloadChunk(x, z, false, false); + unloadChunk0(x, z, false, false); world.getChunkProviderServer().unloadQueue.remove(x, z);