Class KingdomsBackup

java.lang.Object
org.kingdoms.managers.backup.BackupManager
org.kingdoms.managers.backup.KingdomsBackup

public final class KingdomsBackup extends BackupManager
  • Constructor Details

    • KingdomsBackup

      public KingdomsBackup(Kingdoms plugin)
  • Method Details

    • autoBackup

      public void autoBackup()
    • takeBackup

      public void takeBackup()
      Description copied from class: BackupManager
      The default method to take a clean backup. You can override for a custom handler.
      Overrides:
      takeBackup in class BackupManager
    • isWhitelistedDirectory

      public boolean isWhitelistedDirectory(@NonNull Path file)
      Description copied from class: BackupManager
      When taking a backup from the files in the directory, only the contents inside these
      directories will be checked and passed to BackupManager.isWhitelistedFile(Path)
      Specified by:
      isWhitelistedDirectory in class BackupManager
      Parameters:
      file - the directory that we're about to enter.
      Returns:
      true if the contents inside this directory should be accepted.
    • isWhitelistedFile

      public boolean isWhitelistedFile(@NonNull Path file)
      Description copied from class: BackupManager
      When taking a backup from the files in the directory, only these files are accepted.
      Specified by:
      isWhitelistedFile in class BackupManager
      Parameters:
      file - the file that we're about to backup.
      Returns:
      true if the specified path should be accepted.
    • addToZip

      public Collection<Path> addToZip()
      Description copied from class: BackupManager
      Can be either a Path or InputStream
      Specified by:
      addToZip in class BackupManager
      Returns: