Package com.plotsquared.core.backup
Interface BackupProfile
- All Known Implementing Classes:
NullBackupProfile
,PlayerBackupProfile
public interface BackupProfile
-
Method Summary
Modifier and TypeMethodDescriptionCreate a backup of the plot.void
destroy()
Remove all backups stored for this profileGet the directory containing the backups for this profile.Asynchronously populate a list of available backups under this profilerestoreBackup
(@NonNull Backup backup, @Nullable PlotPlayer<?> player) Restore a backup
-
Method Details
-
listBackups
Asynchronously populate a list of available backups under this profile- Returns:
- Future that will be completed with available backups
-
destroy
void destroy()Remove all backups stored for this profile -
getBackupDirectory
Get the directory containing the backups for this profile. This directory may not actually exist.- Returns:
- Folder that contains the backups for this profile
-
createBackup
Create a backup of the plot. If the profile is at the maximum backup capacity, the oldest backup will be deleted.- Returns:
- Future that completes with the created backup.
-
restoreBackup
@NonNull CompletableFuture<Void> restoreBackup(@NonNull Backup backup, @Nullable PlotPlayer<?> player) Restore a backup- Parameters:
backup
- Backup to restoreplayer
- The player restoring the backup- Returns:
- Future that completes when the backup has finished
-