修复卸载插件错误...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-11-29 18:03:44 +08:00
parent 599c3e9a30
commit 551029310d

View File

@ -587,10 +587,10 @@ public class PluginsManager {
} }
result = true; result = true;
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!"); sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
if (plugin != null && !unload(plugin)) { if (!unload(sender, name)) {
FileUtil.copy(file, new File(Bukkit.getUpdateFolderFile().getParentFile(), File.separatorChar + file.getName())); FileUtil.copy(file, new File(Bukkit.getUpdateFolderFile().getParentFile(), File.separatorChar + file.getName()));
} }
load(name); load(sender, name);
} catch (final InvalidDescriptionException e) { } catch (final InvalidDescriptionException e) {
sender.sendMessage("§4异常: §c" + e.getMessage()); sender.sendMessage("§4异常: §c" + e.getMessage());
sender.sendMessage("§4文件: §c" + file.getName() + " 的plugin.yml文件存在错误!"); sender.sendMessage("§4文件: §c" + file.getName() + " 的plugin.yml文件存在错误!");