mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -88,7 +88,8 @@ public class ResidenceMain extends JavaPlugin {
|
|||||||
public static float bukkitver;
|
public static float bukkitver;
|
||||||
|
|
||||||
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+)");
|
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;
|
||||||
@@ -126,6 +127,10 @@ public class ResidenceMain extends JavaPlugin {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void csm(final String... msg) {
|
||||||
|
Bukkit.getConsoleSender().sendMessage("§6[§a领地插件§6] " + msg);
|
||||||
|
}
|
||||||
|
|
||||||
public DataBackup getBackup() {
|
public DataBackup getBackup() {
|
||||||
return backup;
|
return backup;
|
||||||
}
|
}
|
||||||
@@ -519,18 +524,18 @@ public class ResidenceMain extends JavaPlugin {
|
|||||||
init = true;
|
init = true;
|
||||||
} catch (final Exception ex) {
|
} catch (final Exception ex) {
|
||||||
this.getServer().getPluginManager().disablePlugin(this);
|
this.getServer().getPluginManager().disablePlugin(this);
|
||||||
this.getLogger().warning(" - 初始化失败! 卸载插件! 请报告以下错误给作者,谢谢!");
|
csm("§4初始化失败! 卸载插件! 请报告以下错误给作者,谢谢!");
|
||||||
this.getLogger().warning("错误: " + ex);
|
csm("§c错误: " + ex);
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
init = false;
|
init = false;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
final CommandSender console = Bukkit.getConsoleSender();
|
|
||||||
try {
|
try {
|
||||||
new Residence(this);
|
new Residence(this);
|
||||||
this.getLogger().info("旧版本兼容接口初始化成功...");
|
this.getLogger().info("旧版本兼容接口初始化成功...");
|
||||||
} catch (final Exception e) {
|
} catch (final LinkageError e) {
|
||||||
console.sendMessage("§6[§a领地插件§6] §c旧版本兼容接口初始化失败 可能导致部分插件不可用!");
|
this.csm("§c旧版本兼容接口初始化失败 可能导致部分插件不可用!");
|
||||||
console.sendMessage("§6[§a领地插件§6] §e请报告以下错误给作者 §6错误原因: §4" + e.getMessage());
|
this.csm("§c若是其他插件重载本插件 请尝试重启服务器修复此问题!");
|
||||||
}
|
}
|
||||||
new VersionChecker(this);
|
new VersionChecker(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user