mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-02-27 09:11:51 +01:00
Added auto save feature.
This commit is contained in:
parent
60659cd7a2
commit
c9e2ca80aa
@ -214,7 +214,8 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
|
||||
new HopHandler(this);
|
||||
teleportHandler = new TeleportHandler(this);
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, this::saveToFile, 6000, 6000);
|
||||
int timeout = getConfig().getInt("Main.Auto Save Interval In Seconds")* 60 * 20;
|
||||
Bukkit.getScheduler().runTaskTimerAsynchronously(this, this::saveToFile, timeout, timeout);
|
||||
|
||||
PluginManager pluginManager = Bukkit.getPluginManager();
|
||||
|
||||
|
@ -182,6 +182,7 @@ public class SettingsManager implements Listener {
|
||||
ENDERCHESTS("Main.Support Enderchests", true),
|
||||
PARTICLE_TYPE("Main.Upgrade Particle Type", "SPELL_WITCH"),
|
||||
HOP_TICKS("Main.Amount of Ticks Between Hops", 8L),
|
||||
AUTOSAVE("Main.Auto Save Interval In Seconds", 15),
|
||||
TELEPORT_TICKS("Main.Amount of Ticks Between Teleport", 10L),
|
||||
SYNC_TIMEOUT("Main.Timeout When Syncing Hoppers", 300L),
|
||||
MAX_CHUNK("Main.Max Hoppers Per Chunk", -1),
|
||||
|
Loading…
Reference in New Issue
Block a user