diff --git a/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java b/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java index 5cbe070..dc65d36 100644 --- a/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java +++ b/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java @@ -3,6 +3,7 @@ */ package cn.citycraft.Yum.commands; +import org.apache.commons.lang.StringUtils; import org.bukkit.command.CommandException; import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; @@ -44,8 +45,8 @@ public class CommandInfo extends BaseCommand { PluginDescriptionFile desc = plugin.getDescription(); sender.sendMessage("§6插件名称: §3" + plugin.getName()); sender.sendMessage("§6插件版本: §3" + desc.getVersion()); - sender.sendMessage("§6插件作者: §3" + desc.getAuthors().toArray(new String[0]).toString()); - sender.sendMessage("§6插件描述: §3" + desc.getDescription() == null ? "无" : desc.getDescription()); + sender.sendMessage("§6插件作者: §3" + StringUtils.join(desc.getAuthors(), " ")); + sender.sendMessage("§6插件描述: §3" + (desc.getDescription() == null ? "无" : desc.getDescription())); sender.sendMessage("§6插件依赖: §3" + (desc.getDepend().size() == 0 ? "无" : "")); StringUtil.sendStringArray(sender, desc.getDepend()); sender.sendMessage("§6插件软依赖: §3" + (desc.getSoftDepend().size() == 0 ? "无" : "")); diff --git a/src/main/java/cn/citycraft/Yum/utils/DownloadManager.java b/src/main/java/cn/citycraft/Yum/utils/DownloadManager.java index e1baf55..e27bec4 100644 --- a/src/main/java/cn/citycraft/Yum/utils/DownloadManager.java +++ b/src/main/java/cn/citycraft/Yum/utils/DownloadManager.java @@ -23,9 +23,8 @@ public class DownloadManager { } public boolean run(CommandSender sender, String pluginname) { - // String url = - // "http://ci.citycraft.cn:8800/jenkins/job/%1$s/lastSuccessfulBuild/artifact/target/%1$s.jar"; - String url = "https://502647092.github.io/plugins/%1$s/%1$s.jar"; + String url = "http://ci.citycraft.cn:8800/jenkins/job/%1$s/lastSuccessfulBuild/artifact/target/%1$s.jar"; + // String url = "https://502647092.github.io/plugins/%1$s/%1$s.jar"; BufferedInputStream in = null; FileOutputStream fout = null; if (sender == null) { diff --git a/src/main/java/cn/citycraft/Yum/utils/PluginsManager.java b/src/main/java/cn/citycraft/Yum/utils/PluginsManager.java index 5abe2d3..7ae4aba 100644 --- a/src/main/java/cn/citycraft/Yum/utils/PluginsManager.java +++ b/src/main/java/cn/citycraft/Yum/utils/PluginsManager.java @@ -156,7 +156,7 @@ public class PluginsManager { return false; } - private static String load(Plugin plugin) { + public static String load(Plugin plugin) { return load(plugin.getName()); }