From 6e58053eb7b8afe3c75a8d31f730ae92f74d0f7c Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Wed, 9 Feb 2011 20:00:17 +0000 Subject: [PATCH] Probably fixed getLoadedChunks() --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 0abcc9417f..ea509d9ff9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -73,11 +73,12 @@ public class CraftWorld implements World { } public Chunk[] getLoadedChunks() { - net.minecraft.server.Chunk[] chunks = (net.minecraft.server.Chunk[])provider.e.values().toArray(); + Object[] chunks = provider.e.values().toArray(); org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length]; for (int i = 0; i < chunks.length; i++) { - craftChunks[i] = chunks[i].bukkitChunk; + net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk)chunks[i]; + craftChunks[i] = chunk.bukkitChunk; } return craftChunks;