Add a method to know if a snapshot for a CachedChunk is available

This commit is contained in:
FixedDev 2020-12-05 19:58:31 -06:00 committed by Brianna
parent 8e8cb7a01b
commit 41e87c55b9
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ public class CachedChunk {
return PaperLib.getChunkAtAsync(world, this.x, this.z);
}
public boolean isSnapshotAvailable() {
return latestSnapshot != null;
}
public ChunkSnapshot getSnapshot() {
if (latestSnapshot == null)
return takeSnapshot();