Package com.plotsquared.core.backup
Interface BackupManager
- All Known Implementing Classes:
NullBackupManager
,SimpleBackupManager
public interface BackupManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.static void
This will perform an automatic backup of the plot iff the plot has an owner, automatic backups are enabled.int
Get the maximum amount of backups that may be stored for a plot-owner comboGet the directory in which backups are storedgetProfile
(@NonNull Plot plot) Get the backup profile for a plot based on its current owner (if there is one)boolean
Returns true if (potentially) destructive actions should cause PlotSquared to create automatic plot backups
-
Method Details
-
backup
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 backupplot
- Plot to perform the automatic backup onwhenDone
- 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 backupplot
- Plot to perform the automatic backup onwhenDone
- Action that runs when the automatic backup has been completed
-
getBackupPath
Get the directory in which backups are stored- Returns:
- Backup directory path
-
getBackupLimit
int getBackupLimit()Get the maximum amount of backups that may be stored for a plot-owner combo- Returns:
- Backup limit
-
shouldAutomaticallyBackup
boolean shouldAutomaticallyBackup()Returns true if (potentially) destructive actions should cause PlotSquared to create automatic plot backups- Returns:
true
if automatic backups are enabled
-