mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 08:36:45 +01:00
Add option to disable deletion of plot backups when the plot is unclaimed
This commit is contained in:
parent
658361f825
commit
fc74c582bf
@ -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);
|
||||
}
|
||||
|
||||
if (Settings.Backup.DELETE_ON_UNCLAIM) {
|
||||
// Destroy all backups when the plot is unclaimed
|
||||
Objects.requireNonNull(PlotSquared.imp()).getBackupManager()
|
||||
.getProfile(current).destroy();
|
||||
Objects.requireNonNull(PlotSquared.imp()).getBackupManager().getProfile(current).destroy();
|
||||
}
|
||||
|
||||
getArea().removePlot(getId());
|
||||
DBFunc.delete(current);
|
||||
|
Loading…
Reference in New Issue
Block a user