diff --git a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java index a64d0a8..b7cb316 100644 --- a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java +++ b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java @@ -90,7 +90,7 @@ public class ConfigManager { fm.toJSONString(); plugin.getLogger().info("魔改库功能测试正常..."); this.enableMagicLib = true; - } catch (final NoClassDefFoundError | NoSuchMethodError | Exception e) { + } catch (final Error | Exception e) { plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("| 警告: 启动魔改库失败 将使用GUI商店界面..."); plugin.getLogger().warning("+========================================="); diff --git a/src/main/java/org/maxgamer/QuickShop/QuickShop.java b/src/main/java/org/maxgamer/QuickShop/QuickShop.java index 806a992..ca5f74d 100644 --- a/src/main/java/org/maxgamer/QuickShop/QuickShop.java +++ b/src/main/java/org/maxgamer/QuickShop/QuickShop.java @@ -180,9 +180,13 @@ public class QuickShop extends JavaPlugin { logWatcher.close(); // Closes the file } /* Remove all display items, and any dupes we can find */ - shopManager.clear(); + if (shopManager != null) { + shopManager.clear(); + } /* Empty the buffer */ - database.close(); + if (database != null) { + database.close(); + } try { this.database.getConnection().close(); } catch (final SQLException e) {