mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-10-31 20:28:47 +00:00
fix: 修复部分BUG
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
632ee1f20c
commit
6435f2a185
5
pom.xml
5
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>Yum</artifactId>
|
||||
<version>2.7.3</version>
|
||||
<version>2.7.5</version>
|
||||
<name>Yum</name>
|
||||
<description>Minecraft 服务器插件管理系统</description>
|
||||
<build>
|
||||
@ -66,9 +66,10 @@
|
||||
<update.description>§a全新 2.X 版本 更多守护与优化</update.description>
|
||||
<update.changes>
|
||||
§c注意 §6- §aYum更新需要§d重启服务器!§c重启服务器!§4重启服务器!;
|
||||
§b2.7.5 §6- §c修复§eBukkitDev§e下载为空时的异常...;
|
||||
§b2.7.4 §6- §e异步记录服务器报错与耗时操作 §a性能优化...;
|
||||
§b2.7.3 §6- §a调整lag判断条件 减少高峰期误报...;
|
||||
§b2.7.2 §6- §c修复mi lag命令参数错误报错 §d百分比显示能耗...;
|
||||
§b2.7.1 §6- §c修复部分BUG(load可直接载入文件)...;
|
||||
</update.changes>
|
||||
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -27,6 +27,7 @@ import pw.yumc.Yum.managers.ConfigManager;
|
||||
import pw.yumc.Yum.managers.MonitorManager;
|
||||
import pw.yumc.Yum.managers.NetworkManager;
|
||||
import pw.yumc.Yum.runnables.MainThreadCheckTask;
|
||||
import pw.yumc.YumCore.update.SubscribeTask;
|
||||
|
||||
/**
|
||||
* MC插件仓库
|
||||
@ -63,6 +64,7 @@ public class Yum extends JavaPlugin {
|
||||
initRunnable();
|
||||
MonitorManager.init();
|
||||
new VersionChecker(this);
|
||||
new SubscribeTask();
|
||||
YumAPI.updateRepo(Bukkit.getConsoleSender());
|
||||
YumAPI.updateCheck(Bukkit.getConsoleSender());
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ public class YumAPI {
|
||||
*/
|
||||
public static void uninject(final Plugin plugin) {
|
||||
CommandInjector.uninject(plugin);
|
||||
// ListenerInjector.uninject(plugin);
|
||||
ListenerInjector.uninject(plugin);
|
||||
TaskInjector.uninject(plugin);
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ public class YumCommand implements Listener, CommandExecutor {
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "i":
|
||||
case "install": {
|
||||
sender.sendMessage(String.format(fsearching, id));
|
||||
final List<Files> lf = Files.parseList(IOUtil.getData(String.format(BukkitDev.PLUGIN, id)));
|
||||
|
@ -9,6 +9,8 @@ import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JSONValue;
|
||||
|
||||
import cn.citycraft.PluginHelper.kit.StrKit;
|
||||
|
||||
public class BukkitDev implements Serializable {
|
||||
public static String HOST = "https://api.curseforge.com";
|
||||
public static String MODULE = "/servermods";
|
||||
@ -37,6 +39,9 @@ public class BukkitDev implements Serializable {
|
||||
}
|
||||
|
||||
public static List<Files> parseList(final String json) {
|
||||
if (StrKit.isBlank(json) || json.equals("[]")) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
final List<Files> temp = new ArrayList<>();
|
||||
final JSONArray ja = (JSONArray) JSONValue.parse(json);
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
@ -61,6 +66,9 @@ public class BukkitDev implements Serializable {
|
||||
}
|
||||
|
||||
public static List<Projects> parseList(final String json) {
|
||||
if (StrKit.isBlank(json) || json.equals("[]")) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
final List<Projects> temp = new ArrayList<>();
|
||||
final JSONArray ja = (JSONArray) JSONValue.parse(json);
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user