From 1a7f2d109e69f1a2594b91d9ff99fbadb1564b35 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 26 Sep 2018 17:19:16 +1000 Subject: SPIGOT-4397: isChunkGenerated API --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index adf232ea..ddaeefb7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -146,6 +146,11 @@ public class CraftWorld implements World { return world.getChunkProviderServer().isLoaded(x, z); } + @Override + public boolean isChunkGenerated(int x, int z) { + return isChunkLoaded(x, z) || ((ChunkRegionLoader) world.getChunkProviderServer().chunkLoader).chunkExists(x, z); + } + public Chunk[] getLoadedChunks() { Object[] chunks = world.getChunkProviderServer().chunks.values().toArray(); org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length]; -- cgit v1.2.3