From 52db97df0a771fc07cc4172f37b490ecc126b6b9 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 29 Sep 2015 14:09:49 +0800 Subject: [PATCH] move static class init... Signed-off-by: 502647092 --- .../java/com/bekvon/bukkit/residence/ResidenceMain.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java b/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java index c52da90..ce8a694 100644 --- a/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java +++ b/src/main/java/com/bekvon/bukkit/residence/ResidenceMain.java @@ -354,7 +354,6 @@ public class ResidenceMain extends JavaPlugin { public void onEnable() { try { instance = this; - Residence.init(this); this.getLogger().info("Bukkit 版本: " + this.getServer().getBukkitVersion()); bukkitver = Float.parseFloat(this.getServer().getBukkitVersion().substring(0, 3)); init = false; @@ -520,6 +519,12 @@ public class ResidenceMain extends JavaPlugin { ex.printStackTrace(); } backup = new DataBackup(this); + try { + Residence.init(this); + } catch (final Exception e) { + this.getLogger().warning("领地插件旧接口载入失败!"); + this.getLogger().warning("可能会导致部分依赖于此插件的插件无法运行!"); + } new VersionChecker(this); }