1
mirror of https://github.com/CarmJos/MoeTeleport.git synced 2024-09-19 21:35:56 +00:00

修正一个命名错误

This commit is contained in:
Carm Jos 2022-02-27 23:16:19 +08:00
parent e9d4e3f9bc
commit 33c2f9de78
8 changed files with 23 additions and 23 deletions

View File

@ -57,7 +57,7 @@ public class Main extends EasyPlugin {
getInstance().log(messages);
}
public static void serve(String... messages) {
public static void severe(String... messages) {
getInstance().error(messages);
}
@ -74,7 +74,7 @@ public class Main extends EasyPlugin {
info("加载配置文件...");
if (!ConfigManager.initConfig()) {
serve("配置文件初始化失败,请检查。");
severe("配置文件初始化失败,请检查。");
setEnabled(false);
return false;
}
@ -85,7 +85,7 @@ public class Main extends EasyPlugin {
storage = storageMethod.createStorage();
if (!storage.initialize()) {
serve("初始化存储失败,请检查配置文件。");
severe("初始化存储失败,请检查配置文件。");
storage.shutdown();
setEnabled(false);
return false; // 初始化失败不再继续加载

View File

@ -58,8 +58,8 @@ public class UserManager {
return data;
} catch (Exception e) {
Main.serve("无法正常读取玩家数据,玩家操作将不会被保存,请检查数据配置!");
Main.serve("Could not load user's data, please check the data configuration!");
Main.severe("无法正常读取玩家数据,玩家操作将不会被保存,请检查数据配置!");
Main.severe("Could not load user's data, please check the data configuration!");
e.printStackTrace();
return new UserData(userUUID);
}
@ -77,8 +77,8 @@ public class UserManager {
"耗时 " + (System.currentTimeMillis() - start) + "ms。");
} catch (Exception e) {
Main.serve("无法正常保存玩家数据,请检查数据配置!");
Main.serve("Could not save user's data, please check the data configuration!");
Main.severe("无法正常保存玩家数据,请检查数据配置!");
Main.severe("Could not save user's data, please check the data configuration!");
e.printStackTrace();
}
}
@ -143,8 +143,8 @@ public class UserManager {
try {
task.run(MoeTeleport.getStorage());
} catch (Exception exception) {
Main.serve("无法正常更改玩家数据,请检查数据配置!");
Main.serve("Could not edit user's data, please check the data configuration!");
Main.severe("无法正常更改玩家数据,请检查数据配置!");
Main.severe("Could not edit user's data, please check the data configuration!");
exception.printStackTrace();
}
}

View File

@ -19,7 +19,7 @@ public class WarpManager {
try {
MoeTeleport.getStorage().saveWarps();
} catch (Exception exception) {
Main.serve("保存地标数据失败,请检查配置文件。");
Main.severe("保存地标数据失败,请检查配置文件。");
exception.printStackTrace();
}
}
@ -33,7 +33,7 @@ public class WarpManager {
try {
MoeTeleport.getStorage().setWarp(name, new WarpInfo(name,owner, location));
} catch (Exception exception) {
Main.serve("保存地标数据 " + name + " 失败,请检查配置文件。");
Main.severe("保存地标数据 " + name + " 失败,请检查配置文件。");
exception.printStackTrace();
}
@ -51,7 +51,7 @@ public class WarpManager {
try {
MoeTeleport.getStorage().delWarp(name);
} catch (Exception exception) {
Main.serve("删除地标数据 " + name + " 失败,请检查配置文件。");
Main.severe("删除地标数据 " + name + " 失败,请检查配置文件。");
exception.printStackTrace();
}
}

View File

@ -18,8 +18,8 @@ public class CustomStorage implements DataStorage {
@Override
@TestOnly
public boolean initialize() {
Main.serve("您选择使用自定义存储,但并没有应用成功。");
Main.serve("You are using CustomStorage, but not overwrite the methods.");
Main.severe("您选择使用自定义存储,但并没有应用成功。");
Main.severe("You are using CustomStorage, but not overwrite the methods.");
return false;
}

View File

@ -38,7 +38,7 @@ public class MySQLStorage implements DataStorage {
);
this.sqlManager.setDebugMode(() -> Main.getInstance().isDebugging());
} catch (Exception exception) {
Main.serve("无法连接到数据库,请检查配置文件。");
Main.severe("无法连接到数据库,请检查配置文件。");
exception.printStackTrace();
return false;
}
@ -58,7 +58,7 @@ public class MySQLStorage implements DataStorage {
.build().execute();
} catch (SQLException exception) {
Main.serve("无法创建插件所需的表,请检查数据库权限。");
Main.severe("无法创建插件所需的表,请检查数据库权限。");
exception.printStackTrace();
return false;
}
@ -67,7 +67,7 @@ public class MySQLStorage implements DataStorage {
try {
this.warpsMap = loadWarps();
} catch (Exception e) {
Main.serve("无法加载地标数据,请检查数据库权限和相关表。");
Main.severe("无法加载地标数据,请检查数据库权限和相关表。");
e.printStackTrace();
}

View File

@ -36,7 +36,7 @@ public class JSONStorage extends FileBasedStorage {
this.warpsMap = loadWarps();
return true;
} catch (Exception e) {
Main.serve("无法加载地标数据,请检查文件权限和相关配置。");
Main.severe("无法加载地标数据,请检查文件权限和相关配置。");
e.printStackTrace();
}
}

View File

@ -37,7 +37,7 @@ public class YAMLStorage extends FileBasedStorage {
this.warpsMap = loadWarps();
return true;
} catch (Exception e) {
Main.serve("无法加载地标数据,请检查文件权限和相关配置。");
Main.severe("无法加载地标数据,请检查文件权限和相关配置。");
e.printStackTrace();
}
}

View File

@ -18,16 +18,16 @@ public class UpdateChecker {
MoeTeleport.outputInfo();
if (behindVersions == null) {
Main.serve("检查更新失败,请您定期查看插件是否更新,避免安全问题。");
Main.serve("下载地址 " + downloadURL);
Main.severe("检查更新失败,请您定期查看插件是否更新,避免安全问题。");
Main.severe("下载地址 " + downloadURL);
} else if (behindVersions == 0) {
Main.info("检查完成,当前已是最新版本。");
} else if (behindVersions > 0) {
Main.info("发现新版本! 目前已落后 " + behindVersions + " 个版本。");
Main.info("最新版下载地址 " + downloadURL);
} else {
Main.serve("检查更新失败! 当前版本未知,请您使用原生版本以避免安全问题。");
Main.serve("最新版下载地址 " + downloadURL);
Main.severe("检查更新失败! 当前版本未知,请您使用原生版本以避免安全问题。");
Main.severe("最新版下载地址 " + downloadURL);
}
});