mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2025-09-04 13:46:57 +00:00
@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package pw.yumc.Yum.managers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -20,7 +20,7 @@ public class PluginInfo implements Serializable {
|
||||
try {
|
||||
NMSVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
||||
} catch (Exception e) {
|
||||
Log.warning("服务器NMS解析失败: " + Bukkit.getServer().getClass().getPackage().getName());
|
||||
Log.w("服务器NMS解析失败: " + Bukkit.getServer().getClass().getPackage().getName());
|
||||
NMSVersion = "NONMS";
|
||||
}
|
||||
}
|
||||
@ -91,7 +91,7 @@ public class PluginInfo implements Serializable {
|
||||
String ver = version;
|
||||
if (ver == null) {
|
||||
if (plugin.tags != null) {
|
||||
Log.debug("发现存在TAG标签 开始检索: " + NMSVersion);
|
||||
Log.d("发现存在TAG标签 开始检索: " + NMSVersion);
|
||||
for (TagInfo tagInfo : plugin.tags) {
|
||||
if (tagInfo.tag.equalsIgnoreCase(NMSVersion)) {
|
||||
sender.sendMessage("§6版本: §b从Tag标签中获取 §e" + NMSVersion + " §b的最新版本...");
|
||||
|
@ -43,17 +43,19 @@ public class RepoCache implements Serializable {
|
||||
}
|
||||
|
||||
public Repositories getRepo(String repo) {
|
||||
String json = HttpKit.get(repo);
|
||||
if (json.isEmpty()) {
|
||||
Log.console("§c源地址获取数据为空 §b" + repo);
|
||||
try {
|
||||
String json = HttpKit.get(repo);
|
||||
Repositories reposes = new Repositories((JSONObject) JSONValue.parse(json));
|
||||
if (reposes.repos.isEmpty()) {
|
||||
Log.console("§c源地址解析Json为空 §b" + repo);
|
||||
return null;
|
||||
}
|
||||
return reposes;
|
||||
} catch (Exception e) {
|
||||
Throwable ex = e.getCause();
|
||||
Log.console("§c源地址获取数据为空 §b%s §c异常: %s: %s", repo, ex.getClass().getName(), ex.getLocalizedMessage());
|
||||
return null;
|
||||
}
|
||||
Repositories reposes = new Repositories((JSONObject) JSONValue.parse(json));
|
||||
if (reposes.repos.isEmpty()) {
|
||||
Log.console("§c源地址解析Json为空 §b" + repo);
|
||||
return null;
|
||||
}
|
||||
return reposes;
|
||||
}
|
||||
|
||||
public Map<String, Repositories> getRepos() {
|
||||
|
@ -9,31 +9,31 @@ commands:
|
||||
yum:
|
||||
description: MC插件仓库
|
||||
aliases: [y,apt-get]
|
||||
usage: §6使用§a/yum help§6查看帮助!
|
||||
usage: §6使用 §a/yum help §6查看帮助!
|
||||
permission: yum.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
net:
|
||||
description: MC插件网络管理
|
||||
aliases: [n]
|
||||
usage: §6使用§a/net help§6查看帮助!
|
||||
usage: §6使用 §a/net help §6查看帮助!
|
||||
permission: net.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
file:
|
||||
description: MC文件管理命令
|
||||
aliases: [f]
|
||||
usage: §6使用§a/file help§6查看帮助!
|
||||
usage: §6使用 §a/file help §6查看帮助!
|
||||
permission: file.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
security:
|
||||
description: MC安全管理命令
|
||||
aliases: [s]
|
||||
usage: §6使用§a/security help§6查看帮助!
|
||||
usage: §6使用 §a/security help §6查看帮助!
|
||||
permission: security.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
monitor:
|
||||
description: MC系统监控命令
|
||||
aliases: [mi]
|
||||
usage: §6使用§a/monitor help§6查看帮助!
|
||||
usage: §6使用 §a/monitor help §6查看帮助!
|
||||
permission: monitor.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
permissions:
|
||||
|
Reference in New Issue
Block a user