mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-29 05:47:36 +01:00
Properly close MySQL connections when server shuts down
This commit is contained in:
parent
88b59c6c2a
commit
0f6b6fc29c
@ -368,6 +368,9 @@ public class MMOCore extends JavaPlugin {
|
||||
for (Guild guild : dataProvider.getGuildManager().getAll())
|
||||
dataProvider.getGuildManager().save(guild);
|
||||
|
||||
if(dataProvider instanceof MySQLDataProvider)
|
||||
((MySQLDataProvider) dataProvider).close();
|
||||
|
||||
mineManager.resetRemainingBlocks();
|
||||
|
||||
lootChests.getActive().forEach(chest -> chest.unregister(false));
|
||||
|
Loading…
Reference in New Issue
Block a user