From 0df416d6793993b1c5559a18d4f9cee4ab209712 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 11 Jul 2016 21:10:56 +1000 Subject: [PATCH] SPIGOT-113: Add save status to ChunkUnloadEvent --- nms-patches/ChunkProviderServer.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nms-patches/ChunkProviderServer.patch b/nms-patches/ChunkProviderServer.patch index bb34c2031b..37321d64d3 100644 --- a/nms-patches/ChunkProviderServer.patch +++ b/nms-patches/ChunkProviderServer.patch @@ -140,17 +140,18 @@ ++i; } } -@@ -197,6 +270,39 @@ +@@ -197,6 +270,40 @@ return false; } + // CraftBukkit start + public boolean unloadChunk(Chunk chunk, boolean save) { -+ ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); ++ ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk, save); + this.world.getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) { + return false; + } ++ save = event.isSaveChunk(); + + // Update neighbor counts + for (int x = -2; x < 3; x++) {