From fba05ecc81e1d116b6ed32f7627a71f9f2cfc79f Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 17 Jun 2018 18:18:35 -0700 Subject: [PATCH] Fixed bug where database saving was every 5 ticks. Changed to calculate minutes for database backup time. --- src/main/java/us/tastybento/bskyblock/BSkyBlock.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/us/tastybento/bskyblock/BSkyBlock.java b/src/main/java/us/tastybento/bskyblock/BSkyBlock.java index 818d98c17..7cac0f642 100755 --- a/src/main/java/us/tastybento/bskyblock/BSkyBlock.java +++ b/src/main/java/us/tastybento/bskyblock/BSkyBlock.java @@ -121,10 +121,11 @@ public class BSkyBlock extends JavaPlugin { islandsManager.load(); // Save islands & players data asynchronously every X minutes + instance.getServer().getScheduler().runTaskTimer(instance, () -> { playersManager.save(true); islandsManager.save(true); - }, getSettings().getDatabaseBackupPeriod(), getSettings().getDatabaseBackupPeriod()); + }, getSettings().getDatabaseBackupPeriod() * 20 * 60L, getSettings().getDatabaseBackupPeriod() * 20 * 60L); instance.log("#############################################"); instance.log(instance.getDescription().getFullName() + " has been fully enabled.");