Class NullBackupManager

java.lang.Object
com.plotsquared.core.backup.NullBackupManager
All Implemented Interfaces:
BackupManager

public class NullBackupManager extends Object implements BackupManager
  • Constructor Details

    • NullBackupManager

      public NullBackupManager()
  • Method Details

    • getProfile

      public @NonNull BackupProfile getProfile(@NonNull Plot plot)
      Description copied from interface: BackupManager
      Get the backup profile for a plot based on its current owner (if there is one)
      Specified by:
      getProfile in interface BackupManager
      Parameters:
      plot - Plot to get the backup profile for
      Returns:
      Backup profile
    • automaticBackup

      public void automaticBackup(@Nullable PlotPlayer<?> plotPlayer, @NonNull Plot plot, @NonNull Runnable whenDone)
      Description copied from interface: BackupManager
      This will perform an automatic backup of the plot iff the plot has an owner, automatic backups are enabled. Otherwise it will complete immediately.
      Specified by:
      automaticBackup in interface BackupManager
      Parameters:
      plotPlayer - 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

      public @NonNull Path getBackupPath()
      Description copied from interface: BackupManager
      Get the directory in which backups are stored
      Specified by:
      getBackupPath in interface BackupManager
      Returns:
      Backup directory path
    • getBackupLimit

      public int getBackupLimit()
      Description copied from interface: BackupManager
      Get the maximum amount of backups that may be stored for a plot-owner combo
      Specified by:
      getBackupLimit in interface BackupManager
      Returns:
      Backup limit
    • shouldAutomaticallyBackup

      public boolean shouldAutomaticallyBackup()
      Description copied from interface: BackupManager
      Returns true if (potentially) destructive actions should cause PlotSquared to create automatic plot backups
      Specified by:
      shouldAutomaticallyBackup in interface BackupManager
      Returns:
      True if automatic backups are enabled