diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-06-16 19:33:36 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-06-16 19:33:36 +0100 |
commit | e08568de4a24294ef86176fd4dc526c15312402c (patch) | |
tree | 4cd942871254119a77eea109cf74cf64892ebf2f /src/main/java/net/minecraft/server/ChunkProviderServer.java | |
parent | 6f1d6a4ca8a226b091a938b48031d42abec6ff87 (diff) | |
download | craftbukkit-e08568de4a24294ef86176fd4dc526c15312402c.tar craftbukkit-e08568de4a24294ef86176fd4dc526c15312402c.tar.gz craftbukkit-e08568de4a24294ef86176fd4dc526c15312402c.tar.lz craftbukkit-e08568de4a24294ef86176fd4dc526c15312402c.tar.xz craftbukkit-e08568de4a24294ef86176fd4dc526c15312402c.zip |
Implemented ChunkPopulateEvent
Diffstat (limited to 'src/main/java/net/minecraft/server/ChunkProviderServer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 0697b366..0630cd16 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -10,6 +10,7 @@ import java.util.Set; // CraftBukkit start import java.util.Random; +import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.craftbukkit.CraftChunk; import org.bukkit.craftbukkit.CraftServer; @@ -17,6 +18,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.util.LongHashset; import org.bukkit.craftbukkit.util.LongHashtable; import org.bukkit.event.world.ChunkLoadEvent; +import org.bukkit.event.world.ChunkPopulateEvent; import org.bukkit.event.world.ChunkUnloadEvent; import org.bukkit.generator.BlockPopulator; // CraftBukkit end @@ -60,6 +62,7 @@ public class ChunkProviderServer implements IChunkProvider { // CraftBukkit start this.unloadQueue.remove(i, j); Chunk chunk = (Chunk) this.chunks.get(i, j); + boolean newChunk = false; // CraftBukkit end if (chunk == null) { @@ -70,6 +73,7 @@ public class ChunkProviderServer implements IChunkProvider { } else { chunk = this.chunkProvider.getOrCreateChunk(i, j); } + newChunk = true; // Craftbukkit } this.chunks.put(i, j, chunk); // CraftBukkit @@ -87,7 +91,7 @@ public class ChunkProviderServer implements IChunkProvider { * the World constructor. We can't reliably alter that, so we have * no way of creating a CraftWorld/CraftServer at that point. */ - server.getPluginManager().callEvent(new ChunkLoadEvent(chunk.bukkitChunk)); + server.getPluginManager().callEvent(new ChunkLoadEvent(chunk.bukkitChunk, newChunk)); } // CraftBukkit end @@ -190,6 +194,7 @@ public class ChunkProviderServer implements IChunkProvider { } } BlockSand.a = false; + Bukkit.getServer().getPluginManager().callEvent(new ChunkPopulateEvent(chunk.bukkitChunk)); // CraftBukkit end chunk.f(); |