Add a method to know if a snapshot for a CachedChunk is available
This commit is contained in:
parent
8e8cb7a01b
commit
41e87c55b9
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue