Database errors should not affect shop removal

(when disabling the plugin)
This commit is contained in:
Eric 2018-11-05 16:58:51 +01:00
parent 3a7d49d292
commit d55cc4c8fe
1 changed files with 5 additions and 5 deletions

View File

@ -211,13 +211,13 @@ public class ShopChest extends JavaPlugin {
if (shopCreationThreadPool != null) {
shopCreationThreadPool.shutdown();
}
for (Shop shop : shopUtils.getShopsCopy()) {
shopUtils.removeShop(shop, false);
debug("Removed shop (#" + shop.getID() + ")");
}
if (database != null) {
for (Shop shop : shopUtils.getShopsCopy()) {
shopUtils.removeShop(shop, false);
debug("Removed shop (#" + shop.getID() + ")");
}
if (database instanceof SQLite) {
((SQLite) database).vacuum(false);
}