mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
fix NullPointerException...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
139b06e031
commit
f3ed5ff872
@ -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 ? "无" : ""));
|
||||
|
@ -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) {
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user