Class NullBackupProfile

java.lang.Object
com.plotsquared.core.backup.NullBackupProfile
All Implemented Interfaces:
BackupProfile

public class NullBackupProfile extends Object implements BackupProfile
Backup profile for a plot without an owner
  • Constructor Details

    • NullBackupProfile

      public NullBackupProfile()
  • Method Details

    • listBackups

      public @NonNull CompletableFuture<List<Backup>> listBackups()
      Description copied from interface: BackupProfile
      Asynchronously populate a list of available backups under this profile
      Specified by:
      listBackups in interface BackupProfile
      Returns:
      Future that will be completed with available backups
    • destroy

      public void destroy()
      Description copied from interface: BackupProfile
      Remove all backups stored for this profile
      Specified by:
      destroy in interface BackupProfile
    • getBackupDirectory

      public @NonNull Path getBackupDirectory()
      Description copied from interface: BackupProfile
      Get the directory containing the backups for this profile. This directory may not actually exist.
      Specified by:
      getBackupDirectory in interface BackupProfile
      Returns:
      Folder that contains the backups for this profile
    • createBackup

      public @NonNull CompletableFuture<Backup> createBackup()
      Description copied from interface: BackupProfile
      Create a backup of the plot. If the profile is at the maximum backup capacity, the oldest backup will be deleted.
      Specified by:
      createBackup in interface BackupProfile
      Returns:
      Future that completes with the created backup.
    • restoreBackup

      public @NonNull CompletableFuture<Void> restoreBackup(@NonNull Backup backup, @Nullable PlotPlayer<?> player)
      Description copied from interface: BackupProfile
      Restore a backup
      Specified by:
      restoreBackup in interface BackupProfile
      Parameters:
      backup - Backup to restore
      player - The player restoring the backup
      Returns:
      Future that completes when the backup has finished