mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46: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;
|
public static boolean AUTOMATIC_BACKUPS = true;
|
||||||
@Comment("Maximum amount of backups associated with a plot")
|
@Comment("Maximum amount of backups associated with a plot")
|
||||||
public static int BACKUP_LIMIT = 3;
|
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);
|
PlotListener.plotExit(pp, current);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy all backups when the plot is unclaimed
|
if (Settings.Backup.DELETE_ON_UNCLAIM) {
|
||||||
Objects.requireNonNull(PlotSquared.imp()).getBackupManager()
|
// Destroy all backups when the plot is unclaimed
|
||||||
.getProfile(current).destroy();
|
Objects.requireNonNull(PlotSquared.imp()).getBackupManager().getProfile(current).destroy();
|
||||||
|
}
|
||||||
|
|
||||||
getArea().removePlot(getId());
|
getArea().removePlot(getId());
|
||||||
DBFunc.delete(current);
|
DBFunc.delete(current);
|
||||||
|
Loading…
Reference in New Issue
Block a user