Some safety redundancy

This commit is contained in:
nossr50 2021-03-16 14:05:33 -07:00
parent 444d5edd66
commit 49d4e97930
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Version 2.1.182 Version 2.1.182
Fixed several errors in de locale (Thanks TheBusyBiscuit & w1tcherrr) Fixed several errors in de locale (Thanks TheBusyBiscuit & w1tcherrr)
Fixed a bug where double smelt never succeeded if the furnace was empty Fixed a bug where double smelt never succeeded if the furnace was empty
Added some safety so that mcMMO automatic save interval is never more frequent than 1 minute
Version 2.1.181 Version 2.1.181
mcMMO no longer pointlessly tries to check for missing UUIDs for FlatFile database mcMMO no longer pointlessly tries to check for missing UUIDs for FlatFile database

View File

@ -621,7 +621,11 @@ public class mcMMO extends JavaPlugin {
private void scheduleTasks() { private void scheduleTasks() {
// Periodic save timer (Saves every 10 minutes by default) // Periodic save timer (Saves every 10 minutes by default)
long saveIntervalTicks = Config.getInstance().getSaveInterval() * 1200; long second = 20;
long minute = second * 60;
long saveIntervalTicks = Math.max(minute, Config.getInstance().getSaveInterval() * minute);
new SaveTimerTask().runTaskTimer(this, saveIntervalTicks, saveIntervalTicks); new SaveTimerTask().runTaskTimer(this, saveIntervalTicks, saveIntervalTicks);
// Cleanup the backups folder // Cleanup the backups folder