mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 06:18:46 +00:00
fix single plugin upgrade error...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
3a539f593f
commit
9cd2259672
@ -512,13 +512,14 @@ public class PluginsManager {
|
||||
sender.sendMessage("§6升级: §b从 " + updateDirectory.getCanonicalPath() + " 文件夹检索插件插件!");
|
||||
} catch (SecurityException | IOException e1) {
|
||||
sender.sendMessage("§4异常: §c文件夹 " + updateDirectory.getName() + " 权限不足或IO错误!");
|
||||
return false;
|
||||
}
|
||||
for (File file : updateDirectory.listFiles()) {
|
||||
PluginDescriptionFile description = null;
|
||||
try {
|
||||
description = loader.getPluginDescription(file);
|
||||
String name = description.getName();
|
||||
if (plugin != null && name != plugin.getName())
|
||||
if (plugin != null && !name.equals(plugin.getName()))
|
||||
continue;
|
||||
result = true;
|
||||
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
|
||||
@ -539,7 +540,6 @@ public class PluginsManager {
|
||||
* @return 是否成功
|
||||
*/
|
||||
public boolean upgrade(CommandSender sender, Plugin plugin) {
|
||||
sender.sendMessage("§6升级: §a开始升级 " + plugin.getName() + " 插件!");
|
||||
return upgrade(sender, null, plugin);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user