diff options
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/Chunk.java | 5 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index e37db53f..592e3408 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -44,7 +44,10 @@ public class Chunk { } // CraftBukkit start - bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this ); + bukkitChunk = ((WorldServer) world).getWorld().popPreservedChunk( i, j ); + if (bukkitChunk == null) { + bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this ); + } } public org.bukkit.Chunk bukkitChunk; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 87beef57..e6b4be5e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -209,6 +209,8 @@ public class ChunkProviderServer implements IChunkProvider ChunkUnloadEvent cue = new ChunkUnloadEvent(Type.CHUNK_UNLOADED, chunk.bukkitChunk); server.getPluginManager().callEvent(cue); if (!cue.isCancelled()) { + g.getWorld().preserveChunk( (CraftChunk) chunk.bukkitChunk ); + chunk.e(); this.b(chunk); this.a(chunk); |