9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 05:46:57 +00:00

Added option to set autosave interval

This commit is contained in:
Auxilor
2021-10-28 16:40:45 +01:00
parent 271b9f556f
commit 087ed7d19a
2 changed files with 6 additions and 1 deletions

View File

@@ -78,7 +78,11 @@ public class EcoSkillsPlugin extends EcoPlugin {
}
SaveHandler.Companion.save(this);
this.getScheduler().runTimer(new SaveHandler.Runnable(this), 20000, 20000);
this.getScheduler().runTimer(
new SaveHandler.Runnable(this),
this.getConfigYml().getInt("autosave.ticks"),
this.getConfigYml().getInt("autosave.ticks")
);
this.getScheduler().runTimer(new LeaderboardHandler.Runnable(), 50, 2400);
}

View File

@@ -324,5 +324,6 @@ commands:
use-display-name: true
autosave:
ticks: 20000 # The amount of ticks between autosaves
log: true # If auto-save messages should be sent to console
async: false # If saves should be performed asynchronously. May cause bugs without MySQL