Package com.plotsquared.core.backup
Class NullBackupProfile
java.lang.Object
com.plotsquared.core.backup.NullBackupProfile
- All Implemented Interfaces:
BackupProfile
Backup profile for a plot without an owner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull CompletableFuture<Backup>Create a backup of the plot.voiddestroy()Remove all backups stored for this profile@NonNull PathGet the directory containing the backups for this profile.@NonNull CompletableFuture<List<Backup>>Asynchronously populate a list of available backups under this profile@NonNull CompletableFuture<Void>restoreBackup(@NonNull Backup backup, @Nullable PlotPlayer<?> player) Restore a backup
-
Constructor Details
-
NullBackupProfile
public NullBackupProfile()
-
-
Method Details
-
listBackups
Description copied from interface:BackupProfileAsynchronously populate a list of available backups under this profile- Specified by:
listBackupsin interfaceBackupProfile- Returns:
- Future that will be completed with available backups
-
destroy
Description copied from interface:BackupProfileRemove all backups stored for this profile- Specified by:
destroyin interfaceBackupProfile
-
getBackupDirectory
Description copied from interface:BackupProfileGet the directory containing the backups for this profile. This directory may not actually exist.- Specified by:
getBackupDirectoryin interfaceBackupProfile- Returns:
- Folder that contains the backups for this profile
-
createBackup
Description copied from interface:BackupProfileCreate a backup of the plot. If the profile is at the maximum backup capacity, the oldest backup will be deleted.- Specified by:
createBackupin interfaceBackupProfile- Returns:
- Future that completes with the created backup.
-
restoreBackup
public @NonNull CompletableFuture<Void> restoreBackup(@NonNull Backup backup, @Nullable PlotPlayer<?> player) Description copied from interface:BackupProfileRestore a backup- Specified by:
restoreBackupin interfaceBackupProfile- Parameters:
backup- Backup to restoreplayer- The player restoring the backup- Returns:
- Future that completes when the backup has finished
-