mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 22:38: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() + " 文件夹检索插件插件!");
|
sender.sendMessage("§6升级: §b从 " + updateDirectory.getCanonicalPath() + " 文件夹检索插件插件!");
|
||||||
} catch (SecurityException | IOException e1) {
|
} catch (SecurityException | IOException e1) {
|
||||||
sender.sendMessage("§4异常: §c文件夹 " + updateDirectory.getName() + " 权限不足或IO错误!");
|
sender.sendMessage("§4异常: §c文件夹 " + updateDirectory.getName() + " 权限不足或IO错误!");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
for (File file : updateDirectory.listFiles()) {
|
for (File file : updateDirectory.listFiles()) {
|
||||||
PluginDescriptionFile description = null;
|
PluginDescriptionFile description = null;
|
||||||
try {
|
try {
|
||||||
description = loader.getPluginDescription(file);
|
description = loader.getPluginDescription(file);
|
||||||
String name = description.getName();
|
String name = description.getName();
|
||||||
if (plugin != null && name != plugin.getName())
|
if (plugin != null && !name.equals(plugin.getName()))
|
||||||
continue;
|
continue;
|
||||||
result = true;
|
result = true;
|
||||||
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
|
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
|
||||||
@ -539,7 +540,6 @@ public class PluginsManager {
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
public boolean upgrade(CommandSender sender, Plugin plugin) {
|
public boolean upgrade(CommandSender sender, Plugin plugin) {
|
||||||
sender.sendMessage("§6升级: §a开始升级 " + plugin.getName() + " 插件!");
|
|
||||||
return upgrade(sender, null, plugin);
|
return upgrade(sender, null, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user