Implemented config-option autosave
This commit is contained in:
parent
e82de277ef
commit
4626646292
@ -91,8 +91,8 @@ public class Main extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
static int autosaveInterval = 600 * 20;
|
||||
static void initAutoSave(){
|
||||
int autosaveInterval = config.getInt("config.interval")*20;
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () -> {
|
||||
saveData();
|
||||
|
||||
|
@ -19,6 +19,6 @@ locationCheck: # TODO
|
||||
# 5 (= 4 times/s) is usually responsive enough for most interactions
|
||||
interval: 5
|
||||
|
||||
autosave: # TODO
|
||||
autosave:
|
||||
# Interval [in seconds] for autosave
|
||||
interval: 600
|
Loading…
x
Reference in New Issue
Block a user