SPIGOT-3747: Add API for force loaded chunks

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-12-27 12:44:50 +11:00
parent 92e8783d1e
commit cf4055b264
2 changed files with 32 additions and 0 deletions

View File

@@ -147,6 +147,16 @@ public class CraftChunk implements Chunk {
return getWorld().unloadChunk(getX(), getZ(), save, safe);
}
@Override
public boolean isForceLoaded() {
return getWorld().isChunkForceLoaded(getX(), getZ());
}
@Override
public void setForceLoaded(boolean forced) {
getWorld().setChunkForceLoaded(getX(), getZ(), forced);
}
public ChunkSnapshot getChunkSnapshot() {
return getChunkSnapshot(true, false, false);
}