mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Fixed bug where database saving was every 5 ticks.
Changed to calculate minutes for database backup time.
This commit is contained in:
parent
8353d266a5
commit
fba05ecc81
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user