Interface BackupProfile

All Known Implementing Classes:
NullBackupProfile, PlayerBackupProfile

public interface BackupProfile
  • 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

      @NonNull Path 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 restore
      player - The player restoring the backup
      Returns:
      Future that completes when the backup has finished