Class SnapshotRestore
java.lang.Object
com.sk89q.worldedit.world.snapshot.SnapshotRestore
A snapshot restore operation.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotRestore
(ChunkStore chunkStore, EditSession editSession, Region region) Construct the snapshot restore operation. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of chunks that are needed.Get a list of the chunks that could not have been loaded for other reasons.Get the last error message.Get a list of the missing chunks.boolean
Checks to see where the backup succeeded in any capacity.void
restore()
Restores to world.
-
Constructor Details
-
SnapshotRestore
Construct the snapshot restore operation.- Parameters:
chunkStore
- TheChunkStore
to restore fromeditSession
- TheEditSession
to restore toregion
- TheRegion
to restore to
-
-
Method Details
-
getChunksAffected
public int getChunksAffected()Get the number of chunks that are needed.- Returns:
- a number of chunks
-
restore
Restores to world.- Throws:
MaxChangedBlocksException
- if the max block change limit is exceeded
-
getMissingChunks
Get a list of the missing chunks. restore() must have been called already.- Returns:
- a list of coordinates
-
getErrorChunks
Get a list of the chunks that could not have been loaded for other reasons. restore() must have been called already.- Returns:
- a list of coordinates
-
hadTotalFailure
public boolean hadTotalFailure()Checks to see where the backup succeeded in any capacity. False will be returned if no chunk could be successfully loaded.- Returns:
- true if there was total failure
-
getLastErrorMessage
Get the last error message.- Returns:
- a message
-