mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
fix upgrade command...
This commit is contained in:
parent
ce1dab38cc
commit
d42f635dfc
@ -27,18 +27,19 @@ public class CommandUpgrade extends BaseCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(final CommandSender sender, String label, final String[] args) throws CommandException {
|
public void execute(final CommandSender sender, String label, final String[] args) throws CommandException {
|
||||||
final String pluginname = args[0];
|
Bukkit.getScheduler().runTaskAsynchronously(main, () -> {
|
||||||
final Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
|
if (args.length == 0)
|
||||||
sender.sendMessage("§a开始升级插件: " + pluginname);
|
YumManager.plugman.upgrade(sender);
|
||||||
if (plugin != null)
|
else {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(main, () -> {
|
String pluginname = args[0];
|
||||||
if (args.length == 1)
|
Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginname);
|
||||||
|
sender.sendMessage("§a开始升级插件: " + pluginname);
|
||||||
|
if (plugin != null)
|
||||||
YumManager.plugman.upgrade(sender, plugin);
|
YumManager.plugman.upgrade(sender, plugin);
|
||||||
else
|
else
|
||||||
YumManager.plugman.upgrade(sender);
|
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
||||||
});
|
}
|
||||||
else
|
});
|
||||||
sender.sendMessage("§c插件未安装或已卸载 需要安装请使用yum install " + pluginname + "!");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user