Improved handling of async tasks (autosave, on server shutdown)

This commit is contained in:
Jules 2024-02-21 13:11:23 +01:00
parent 1e370864cd
commit 5e466dd8c2

View File

@ -280,9 +280,8 @@ public class MMOCore extends MMOPlugin {
for (Guild guild : dataProvider.getGuildManager().getAll()) for (Guild guild : dataProvider.getGuildManager().getAll())
dataProvider.getGuildManager().save(guild); dataProvider.getGuildManager().save(guild);
// Close MySQL data provider (memory leaks) // Close player data manager
playerDataManager.saveAll(false); playerDataManager.close();
playerDataManager.getDataHandler().close();
// Reset active blocks // Reset active blocks
mineManager.resetRemainingBlocks(); mineManager.resetRemainingBlocks();