Only disconnect database if initialized

This commit is contained in:
Eric 2020-04-26 14:34:08 +02:00
parent d9618aa227
commit 1736196a05

View File

@ -256,7 +256,7 @@ public class ShopChest extends JavaPlugin {
debug("Removed shop (#" + shop.getID() + ")"); debug("Removed shop (#" + shop.getID() + ")");
} }
if (database != null) { if (database != null && database.isInitialized()) {
if (database instanceof SQLite) { if (database instanceof SQLite) {
((SQLite) database).vacuum(); ((SQLite) database).vacuum();
} }