mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Add option to disable deletion of plot backups when the plot is unclaimed
This commit is contained in:
parent
658361f825
commit
fc74c582bf
2 changed files with 6 additions and 3 deletions
|
@ -420,6 +420,8 @@ public class Settings extends Config {
|
|||
public static boolean AUTOMATIC_BACKUPS = true;
|
||||
@Comment("Maximum amount of backups associated with a plot")
|
||||
public static int BACKUP_LIMIT = 3;
|
||||
@Comment("Whether or not backups should be deleted when the plot is unclaimed")
|
||||
public static boolean DELETE_ON_UNCLAIM = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1360,9 +1360,10 @@ public class Plot {
|
|||
PlotListener.plotExit(pp, current);
|
||||
}
|
||||
|
||||
// Destroy all backups when the plot is unclaimed
|
||||
Objects.requireNonNull(PlotSquared.imp()).getBackupManager()
|
||||
.getProfile(current).destroy();
|
||||
if (Settings.Backup.DELETE_ON_UNCLAIM) {
|
||||
// Destroy all backups when the plot is unclaimed
|
||||
Objects.requireNonNull(PlotSquared.imp()).getBackupManager().getProfile(current).destroy();
|
||||
}
|
||||
|
||||
getArea().removePlot(getId());
|
||||
DBFunc.delete(current);
|
||||
|
|
Loading…
Reference in a new issue