diff options
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 13 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 |
2 files changed, 17 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); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index dc3945db..6f4e49bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -59,6 +59,10 @@ public class CraftWorld implements World { return world.A.a( x, z ); } + public Chunk[] getLoadedChunks() { + return world.A.getLoadedChunks(); + } + public void loadChunk(int x, int z) { world.A.d(x, z); } |