Interface BackupManager

All Known Implementing Classes:
NullBackupManager, SimpleBackupManager

public interface BackupManager
  • Method Details

    • backup

      static void backup(@Nullable PlotPlayer<?> player, @NonNull Plot plot, @NonNull Runnable whenDone)
      This will perform an automatic backup of the plot iff the plot has an owner, automatic backups are enabled. Otherwise it will complete immediately.
      Parameters:
      player - Player that triggered the backup
      plot - Plot to perform the automatic backup on
      whenDone - Action that runs when the automatic backup has been completed
    • getProfile

      Get the backup profile for a plot based on its current owner (if there is one)
      Parameters:
      plot - Plot to get the backup profile for
      Returns:
      Backup profile
    • automaticBackup

      void automaticBackup(@Nullable PlotPlayer<?> player, @NonNull Plot plot, @NonNull Runnable whenDone)
      This will perform an automatic backup of the plot iff the plot has an owner, automatic backups are enabled. Otherwise it will complete immediately.
      Parameters:
      player - Player that triggered the backup
      plot - Plot to perform the automatic backup on
      whenDone - Action that runs when the automatic backup has been completed
    • getBackupPath

      Get the directory in which backups are stored
      Returns:
      Backup directory path
    • getBackupLimit

      Get the maximum amount of backups that may be stored for a plot-owner combo
      Returns:
      Backup limit
    • shouldAutomaticallyBackup

      Returns true if (potentially) destructive actions should cause PlotSquared to create automatic plot backups
      Returns:
      true if automatic backups are enabled