mirror of
				https://e.coding.net/circlecloud/Yum.git
				synced 2025-11-04 05:06:02 +00:00 
			
		
		
		
	@@ -23,13 +23,15 @@ public class PluginTabComplete implements HandlerCommands {
 | 
			
		||||
        final String[] args = e.getArgs();
 | 
			
		||||
        if (args[0].equalsIgnoreCase("install") || args[0].equalsIgnoreCase("i")) {
 | 
			
		||||
            return StrKit.copyPartialMatches(args[1], YumAPI.getRepo().getAllPluginName(), new ArrayList<String>());
 | 
			
		||||
        } else if (args[0].equalsIgnoreCase("repo")) {
 | 
			
		||||
        } else if (args[0].equalsIgnoreCase("repo") || args[0].equalsIgnoreCase("r")) {
 | 
			
		||||
            if (args.length == 2) {
 | 
			
		||||
                return StrKit.copyPartialMatches(args[1], Arrays.asList(new String[] { "add", "all", "list", "delall", "clean", "update", "del" }), new ArrayList<String>());
 | 
			
		||||
            }
 | 
			
		||||
            if (args.length == 3 && (args[1] == "add" || args[1] == "del")) {
 | 
			
		||||
                return StrKit.copyPartialMatches(args[2], YumAPI.getRepo().getRepos().keySet(), new ArrayList<String>());
 | 
			
		||||
            }
 | 
			
		||||
        } else if (args[0].equalsIgnoreCase("bukkitrepo") || args[0].equalsIgnoreCase("br")) {
 | 
			
		||||
            return StrKit.copyPartialMatches(args[1], Arrays.asList(new String[] { "look", "install" }), new ArrayList<String>());
 | 
			
		||||
        } else {
 | 
			
		||||
            return StrKit.copyPartialMatches(args[1], YumAPI.getPlugman().getPluginNames(false), new ArrayList<String>());
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ public class CommandInjector implements TabExecutor {
 | 
			
		||||
            final long end = System.nanoTime();
 | 
			
		||||
            final long lag = end - start;
 | 
			
		||||
            if (Bukkit.isPrimaryThread() && lag / 1000000 > 10) {
 | 
			
		||||
                PluginKit.sc("§6[§bYum §a能耗监控§6] §c注意! §6插件 §b" + plugin.getName() + " §6执行 §d" + label + " " + StrKit.join(args, " ") + " §6命令 §c耗时 §4" + lag / 1000000 + "ms!");
 | 
			
		||||
                PluginKit.sc("§6[§bYum §a能耗监控§6] §c注意! §6玩家 §a" + sender.getName() + " §6执行 §b" + plugin.getName() + " §6插件 §d" + label + " " + StrKit.join(args, " ") + " §6命令 §c耗时 §4" + lag / 1000000 + "ms!");
 | 
			
		||||
            }
 | 
			
		||||
            totalTime += lag;
 | 
			
		||||
            count++;
 | 
			
		||||
@@ -106,7 +106,7 @@ public class CommandInjector implements TabExecutor {
 | 
			
		||||
                e = e.getCause();
 | 
			
		||||
            }
 | 
			
		||||
            MonitorCommand.lastError = e;
 | 
			
		||||
            PluginKit.sc(prefix + "§6插件 §b" + plugin.getName() + " §6执行 §d" + label + " §6命令时发生异常!");
 | 
			
		||||
            PluginKit.sc(prefix + "§6玩家 §a" + sender.getName() + " §6执行 §b" + plugin.getName() + " §6插件 §d" + label + " " + StrKit.join(args, " ") + " §6命令时发生异常!");
 | 
			
		||||
            PluginKit.sc("§6异常名称: §c" + e.getClass().getName());
 | 
			
		||||
            PluginKit.sc("§6异常说明: §3" + e.getMessage());
 | 
			
		||||
            PluginKit.sc("§6简易错误信息如下:");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user