The autosave tickspeed is now adjustable

This commit is contained in:
Brianna O'Keefe 2018-12-30 21:17:04 -05:00
parent 4ed48e839b
commit 5d4613d5bd
2 changed files with 4 additions and 1 deletions

View File

@ -281,7 +281,9 @@ public class EpicSpawnersPlugin extends JavaPlugin implements EpicSpawners {
if (pluginManager.isPluginEnabled("USkyBlock")) this.register(HookUSkyBlock::new);
if (pluginManager.isPluginEnabled("WorldGuard")) this.register(HookWorldGuard::new);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveToFile, 6000, 6000);
int timeout = SettingsManager.Setting.AUTOSAVE.getInt() * 60 * 20;
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveToFile, timeout, timeout);
// Start tasks
this.particleTask = SpawnerParticleTask.startTask(this);

View File

@ -221,6 +221,7 @@ public class SettingsManager implements Listener {
UPGRADE_PARTICLE_TYPE("Main.Upgrade Particle Type", "SPELL_WITCH"),
EXTRA_SPAWN_TICKS("Main.Extra Ticks Added To Each Spawn", 0),
MAX_SPAWNERS("Main.Max Spawners Per Player", -1),
AUTOSAVE("Main.Auto Save Interval In Seconds", 15),
COST_EQUATION_XP("Main.Equations.Calculate XP Upgrade Cost", "{XPCost} * {Level}"),
COST_EQUATION_ECO("Main.Equations.Calculate Economy Upgrade Cost", "{ECOCost} * {Level}"),