mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-12-23 05:08:47 +00:00
临时兼容旧版本更新列表...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
67894d8449
commit
83d240e29d
@ -223,15 +223,34 @@ public class YumAPI {
|
||||
* - 命令发送者
|
||||
*/
|
||||
public static void updateall(final CommandSender sender) {
|
||||
final Map<String, Plugin> updatelist = UpdatePlugin.getUpdateList();
|
||||
if (updatelist.size() > 0) {
|
||||
for (final Entry<String, Plugin> updateplugin : UpdatePlugin.getUpdateList().entrySet()) {
|
||||
updatefromyum(sender, updateplugin.getValue(), null);
|
||||
try {
|
||||
|
||||
final Map<String, Plugin> updatelist = UpdatePlugin.getUpdateList();
|
||||
if (updatelist.size() > 0) {
|
||||
for (final Entry<String, Plugin> updateplugin : UpdatePlugin.getUpdateList().entrySet()) {
|
||||
updatefromyum(sender, updateplugin.getValue(), null);
|
||||
}
|
||||
UpdatePlugin.clearList();
|
||||
sender.sendMessage("§6更新: §c已下载所有需要插件的插件到 到update文件夹 重启后自动更新(或使用/yum upgrade直接升级)!");
|
||||
} else {
|
||||
sender.sendMessage("§6更新: §e未找到需要更新且可以用Yum处理的插件!");
|
||||
}
|
||||
} catch (final Exception | Error e) {
|
||||
try {
|
||||
final Map<Plugin, String> updatelist = UpdatePlugin.getList();
|
||||
if (updatelist.size() > 0) {
|
||||
for (final Entry<Plugin, String> updateplugin : UpdatePlugin.getList().entrySet()) {
|
||||
updatefromyum(sender, updateplugin.getKey(), null);
|
||||
}
|
||||
UpdatePlugin.getList().clear();
|
||||
sender.sendMessage("§6更新: §c已下载所有需要插件的插件到 到update文件夹 重启后自动更新(或使用/yum upgrade直接升级)!");
|
||||
} else {
|
||||
sender.sendMessage("§6更新: §e未找到需要更新且可以用Yum处理的插件!");
|
||||
}
|
||||
} catch (final Exception | Error e2) {
|
||||
sender.sendMessage("§4错误: §c无法检索全体更新列表!");
|
||||
sender.sendMessage("§4异常: §c" + e2.getMessage());
|
||||
}
|
||||
UpdatePlugin.clearList();
|
||||
sender.sendMessage("§6更新: §c已下载所有需要插件的插件到 到update文件夹 重启后自动更新(或使用/yum upgrade直接升级)!");
|
||||
} else {
|
||||
sender.sendMessage("§6更新: §e未找到需要更新且可以用Yum处理的插件!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user