1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2025-11-24 21:46:16 +00:00

add enable error tip...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092
2015-09-30 09:27:48 +08:00
parent 8d50e5e7fd
commit 8215d02de0

View File

@@ -18,6 +18,7 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.jar.JarEntry; import java.util.jar.JarEntry;
import java.util.jar.JarFile; import java.util.jar.JarFile;
import java.util.regex.Pattern;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
@@ -88,6 +89,7 @@ public class ResidenceMain extends JavaPlugin {
public final static int saveVersion = 1; public final static int saveVersion = 1;
public final static String[] validLanguages = { "English", "Chinese" }; public final static String[] validLanguages = { "English", "Chinese" };
public final static Pattern VER_REGEX = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)");
protected static ResidenceMain instance; protected static ResidenceMain instance;
protected DataBackup backup; protected DataBackup backup;
protected ResidenceBlockListener blistener; protected ResidenceBlockListener blistener;
@@ -511,7 +513,6 @@ public class ResidenceMain extends JavaPlugin {
} }
this.getLogger().info("载入完成! 版本: " + this.getDescription().getVersion() + " 重制 by 喵♂呜"); this.getLogger().info("载入完成! 版本: " + this.getDescription().getVersion() + " 重制 by 喵♂呜");
backup = new DataBackup(this); backup = new DataBackup(this);
new Residence(this);
init = true; init = true;
} catch (final Exception ex) { } catch (final Exception ex) {
this.getServer().getPluginManager().disablePlugin(this); this.getServer().getPluginManager().disablePlugin(this);
@@ -520,6 +521,14 @@ public class ResidenceMain extends JavaPlugin {
ex.printStackTrace(); ex.printStackTrace();
init = false; init = false;
} }
final CommandSender console = Bukkit.getConsoleSender();
try {
new Residence(this);
this.getLogger().info("旧版本兼容接口初始化成功...");
} catch (final Exception e) {
console.sendMessage("§6[§a领地插件§6] §c旧版本兼容接口初始化失败 可能导致部分插件不可用!");
console.sendMessage("§6[§a领地插件§6] §e请报告以下错误给作者 §6错误原因: §4" + e.getMessage());
}
new VersionChecker(this); new VersionChecker(this);
} }