1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-12-28 07:58:49 +00:00

catch all error and exception while load magic lib...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-10-21 14:20:06 +08:00
parent fa9eead0a9
commit 56e0fd8430
2 changed files with 7 additions and 3 deletions

View File

@ -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("+=========================================");

View File

@ -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) {