From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 12 May 2016 02:03:56 -0400 Subject: [PATCH] Unmark chunk as unloading when unload is cancelled diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk { private long w; private int x; private ConcurrentLinkedQueue y; - public boolean d; + public boolean d;public void setShouldUnload(boolean unload) { this.d = unload; } // Paper // OBFHELPER protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap(); // Spigot // Paper start diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { Chunk chunk = (Chunk) this.chunks.get(olong); if (chunk != null && chunk.d) { + chunk.setShouldUnload(false); // Paper // CraftBukkit start ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); this.world.getServer().getPluginManager().callEvent(event); --