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