mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-09 20:21:07 +00:00
Database errors should not affect shop removal
(when disabling the plugin)
This commit is contained in:
parent
3a7d49d292
commit
d55cc4c8fe
@ -211,13 +211,13 @@ public class ShopChest extends JavaPlugin {
|
|||||||
if (shopCreationThreadPool != null) {
|
if (shopCreationThreadPool != null) {
|
||||||
shopCreationThreadPool.shutdown();
|
shopCreationThreadPool.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Shop shop : shopUtils.getShopsCopy()) {
|
||||||
|
shopUtils.removeShop(shop, false);
|
||||||
|
debug("Removed shop (#" + shop.getID() + ")");
|
||||||
|
}
|
||||||
|
|
||||||
if (database != null) {
|
if (database != null) {
|
||||||
for (Shop shop : shopUtils.getShopsCopy()) {
|
|
||||||
shopUtils.removeShop(shop, false);
|
|
||||||
debug("Removed shop (#" + shop.getID() + ")");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (database instanceof SQLite) {
|
if (database instanceof SQLite) {
|
||||||
((SQLite) database).vacuum(false);
|
((SQLite) database).vacuum(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user