diff options
author | Raphfrk <raphfrk@gmail.com> | 2011-02-04 20:11:57 +0000 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-02-05 15:06:02 +0100 |
commit | 101d01ef644c29da1393bdd325a910f7aa5cf097 (patch) | |
tree | 0664a7538fcb0badb5b3616c50208c2f2c8d55dd /src/main/java/net | |
parent | 73f0347eb0fb6ab1cec08e9d83d524678043ab54 (diff) | |
download | craftbukkit-101d01ef644c29da1393bdd325a910f7aa5cf097.tar craftbukkit-101d01ef644c29da1393bdd325a910f7aa5cf097.tar.gz craftbukkit-101d01ef644c29da1393bdd325a910f7aa5cf097.tar.lz craftbukkit-101d01ef644c29da1393bdd325a910f7aa5cf097.tar.xz craftbukkit-101d01ef644c29da1393bdd325a910f7aa5cf097.zip |
getLoadedChunks method
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index abf5956a..d0da9745 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -33,6 +33,19 @@ public class ChunkProviderServer implements IChunkProvider { this.c = ichunkprovider; } + // CraftBukkit start + public org.bukkit.Chunk[] getLoadedChunks() { + Object[] chunks = e.values().toArray(); + org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length]; + + for(int cnt =0;cnt<chunks.length;cnt++) { + craftChunks[cnt] = ((Chunk)chunks[cnt]).bukkitChunk; + } + + return craftChunks; + } + // CraftBukkit end + public boolean a(int i, int j) { ChunkCoordinates chunkcoordinates = new ChunkCoordinates(i, j); |