diff --git a/pom.xml b/pom.xml index f80ad1f..1cb7b54 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 cn.citycraft Yum - 1.8.6 + 1.8.7 Yum Minecraft 服务器插件管理系统 @@ -55,7 +55,7 @@ http://ci.citycraft.cn:8080 - &c新增只允许控制台执行选项... + &c修改部分方案 增强稳定性... UTF-8 diff --git a/src/main/java/cn/citycraft/Yum/commands/CommandDelete.java b/src/main/java/cn/citycraft/Yum/commands/CommandDelete.java index fb4a44f..8e2264b 100644 --- a/src/main/java/cn/citycraft/Yum/commands/CommandDelete.java +++ b/src/main/java/cn/citycraft/Yum/commands/CommandDelete.java @@ -21,9 +21,6 @@ import cn.citycraft.Yum.api.YumAPI; public class CommandDelete extends BaseCommand { Yum main; - /** - * @param name - */ public CommandDelete(final Yum main) { super("remove"); this.main = main; @@ -37,8 +34,9 @@ public class CommandDelete extends BaseCommand { final String pluginname = args[0]; final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname); if (plugin != null) { + final String version = plugin.getDescription().getVersion(); if (YumAPI.getPlugman().deletePlugin(sender, plugin)) { - sender.sendMessage("§c删除: §a插件 " + pluginname + " 已从服务器卸载并删除!"); + sender.sendMessage("§c删除: §a插件 §6" + pluginname + " §a版本 §d" + version + " §a已从服务器卸载并删除!"); } else { sender.sendMessage("§c删除: §c插件 " + pluginname + " 卸载或删除时发生错误 删除失败!"); } diff --git a/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java b/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java index 757b2ee..f9a129c 100644 --- a/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java +++ b/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java @@ -292,7 +292,7 @@ public class PluginsManager { target.onLoad(); Bukkit.getPluginManager().enablePlugin(target); - sender.sendMessage("§6载入: §a插件 §b" + target.getName() + " §a版本 §d" + target.getDescription().getVersion() + " 已成功载入到服务器!"); + sender.sendMessage("§6载入: §a插件 §b" + target.getName() + " §a版本 §d" + target.getDescription().getVersion() + " §a已成功载入到服务器!"); return true; } @@ -316,7 +316,7 @@ public class PluginsManager { final File pluginDir = new File("plugins"); final File updateDir = new File(pluginDir, "update"); if (!pluginDir.isDirectory()) { - sender.sendMessage("§c插件目录不存在或IO错误!"); + sender.sendMessage("§6载入: §c插件目录不存在或IO错误!"); return false; } @@ -337,7 +337,7 @@ public class PluginsManager { } } if (pluginFile == null) { - sender.sendMessage("§6载入: §c在插件目录和更新目录均未找到 " + name + " 插件 请确认文件是否存在!"); + sender.sendMessage("§6载入: §c在插件目录和更新目录均未找到 §b" + name + " §c插件 请确认文件是否存在!"); return false; } } @@ -484,7 +484,7 @@ public class PluginsManager { knownCommandsField.setAccessible(true); knownCommands = (Map) knownCommandsField.get(commandMap); } catch (final Exception e) { - sender.sendMessage("§4异常: §c" + e.getMessage() + " 插件 " + name + " 卸载失败!"); + sender.sendMessage("§4异常: §c" + e.getMessage() + " 插件 §b" + name + " §c卸载失败!"); return false; } String pluginVersion = ""; @@ -494,12 +494,12 @@ public class PluginsManager { if ((plugins != null) && (plugins.contains(next))) { pluginVersion = next.getDescription().getVersion(); plugins.remove(next); - sender.sendMessage("§6卸载: §a从服务器插件列表删除 " + name + " 的实例!"); + sender.sendMessage("§6卸载: §a从服务器插件列表删除 §b" + name + " §a的实例!"); } if ((lookupNames != null) && (lookupNames.containsKey(name))) { lookupNames.remove(name); - sender.sendMessage("§6卸载: §a从插件查找列表删除 " + name + " 的实例!"); + sender.sendMessage("§6卸载: §a从插件查找列表删除 §b" + name + " §a的实例!"); } if (commandMap != null) { @@ -523,7 +523,7 @@ public class PluginsManager { System.gc(); } } - sender.sendMessage("§6卸载: §a插件 §b" + name + " §a版本 §d" + pluginVersion + " 已成功卸载!"); + sender.sendMessage("§6卸载: §a插件 §b" + name + " §a版本 §d" + pluginVersion + " §a已成功卸载!"); return true; }