diff options
author | md_5 <git@md-5.net> | 2018-09-26 17:19:16 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-09-26 17:19:16 +1000 |
commit | 1a7f2d109e69f1a2594b91d9ff99fbadb1564b35 (patch) | |
tree | 8544d238f1833b69a0f0b8724d82a1c162c683af /src/main/java/org | |
parent | 40aed54d112176ab49f1c3c65877e23bcb49f463 (diff) | |
download | craftbukkit-1a7f2d109e69f1a2594b91d9ff99fbadb1564b35.tar craftbukkit-1a7f2d109e69f1a2594b91d9ff99fbadb1564b35.tar.gz craftbukkit-1a7f2d109e69f1a2594b91d9ff99fbadb1564b35.tar.lz craftbukkit-1a7f2d109e69f1a2594b91d9ff99fbadb1564b35.tar.xz craftbukkit-1a7f2d109e69f1a2594b91d9ff99fbadb1564b35.zip |
SPIGOT-4397: isChunkGenerated API
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 5 |
1 files changed, 5 insertions, 0 deletions
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]; |