mirror of
				https://e.coding.net/circlecloud/YumCore.git
				synced 2025-11-03 23:06:02 +00:00 
			
		
		
		
	@@ -83,7 +83,7 @@ public class CommandManager implements TabExecutor {
 | 
				
			|||||||
     * @param executor
 | 
					     * @param executor
 | 
				
			||||||
     *            命令执行类
 | 
					     *            命令执行类
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public CommandManager(final String name, final CommandExecutor executor) {
 | 
					    public CommandManager(final String name, final CommandExecutor... executor) {
 | 
				
			||||||
        this(name);
 | 
					        this(name);
 | 
				
			||||||
        register(executor);
 | 
					        register(executor);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -126,13 +126,15 @@ public class CommandManager implements TabExecutor {
 | 
				
			|||||||
     * @param clazz
 | 
					     * @param clazz
 | 
				
			||||||
     *            子命令处理类
 | 
					     *            子命令处理类
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public void register(final CommandExecutor clazz) {
 | 
					    public void register(final CommandExecutor... clazzs) {
 | 
				
			||||||
        final Method[] methods = clazz.getClass().getDeclaredMethods();
 | 
					        for (final CommandExecutor clazz : clazzs) {
 | 
				
			||||||
        for (final Method method : methods) {
 | 
					            final Method[] methods = clazz.getClass().getDeclaredMethods();
 | 
				
			||||||
            if (registerCommand(method, clazz)) {
 | 
					            for (final Method method : methods) {
 | 
				
			||||||
                continue;
 | 
					                if (registerCommand(method, clazz)) {
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                registerTab(method, clazz);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            registerTab(method, clazz);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        help = new CommandHelp(cmds);
 | 
					        help = new CommandHelp(cmds);
 | 
				
			||||||
        buildCmdNameCache();
 | 
					        buildCmdNameCache();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user