Unload all shops when server shutting down

Former-commit-id: 96a54564cff4c48068ef7b2c1be4e7111d3621c5 [formerly 39470a2e4b50b10bb029c1bb27a70f4320c420b4]
Former-commit-id: 1c3bcbde49c6ed245072e5e645e01544745141d7
This commit is contained in:
Ghost_chu committed 2019-08-13 16:23:50 +08:00
1 parent bea49d773b
commit 044aaac665
1 file changed
+3 -1
@@ -19,6 +19,7 @@ import org.maxgamer.quickshop.Database.*;
import org.maxgamer.quickshop.Database.Database.ConnectionException;
import org.maxgamer.quickshop.Economy.*;
import org.maxgamer.quickshop.Listeners.*;
import org.maxgamer.quickshop.Shop.Shop;
import org.maxgamer.quickshop.Shop.ShopLoader;
import org.maxgamer.quickshop.Shop.ShopManager;
import org.maxgamer.quickshop.Util.Timer;
@@ -233,8 +234,9 @@ private int displayItemCheckTicks;
}
Util.debugLog("Unloading all shops...");
try {
this.getShopManager().getLoadedShops().forEach(Shop::onUnload);
} catch (Throwable th) {
//ignore
//ignore, we didn't care that
}
Util.debugLog("Cleaning up database queues...");