当插件存在update文件夹但是未安装时 自动安装插件...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-12-01 21:34:11 +08:00
parent 67894d8449
commit 751e42ad94

View File

@ -616,9 +616,11 @@ public class PluginsManager {
continue;
}
result = true;
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
if (!unload(sender, name)) {
sender.sendMessage("§6升级: §d开始安装 §b" + name + " §d插件!");
FileUtil.copy(file, new File(Bukkit.getUpdateFolderFile().getParentFile(), File.separatorChar + file.getName()));
} else {
sender.sendMessage("§6升级: §a开始升级 §b" + name + " §a插件!");
}
load(sender, name);
} catch (final InvalidDescriptionException e) {