Package com.sk89q.minecraft.util.commands

Examples of com.sk89q.minecraft.util.commands.Command.aliases()


    public void registerMethodsAsCommands(Dispatcher dispatcher, Object object) throws ParametricException {
        for (Method method : object.getClass().getDeclaredMethods()) {
            Command definition = method.getAnnotation(Command.class);
            if (definition != null) {
                CommandCallable callable = build(object, method, definition);
                dispatcher.registerCommand(callable, definition.aliases());
            }
        }
    }

    /**
 
View Full Code Here


                }

                Command cmd = method.getAnnotation(Command.class);

                stream.println("|-");
                stream.print("| " + prefix + cmd.aliases()[0]);
                stream.print(" || ");

                if (method.isAnnotationPresent(CommandPermissions.class)) {
                    CommandPermissions perms =
                            method.getAnnotation(CommandPermissions.class);
View Full Code Here

                }

                stream.print(" || ");

                boolean firstAlias = true;
                if (cmd.aliases().length != 0) {
                    for (String alias : cmd.aliases()) {
                        if (!firstAlias) stream.print("<br />");
                        stream.print(prefix + alias);
                        firstAlias = false;
                    }
View Full Code Here

                stream.print(" || ");

                boolean firstAlias = true;
                if (cmd.aliases().length != 0) {
                    for (String alias : cmd.aliases()) {
                        if (!firstAlias) stream.print("<br />");
                        stream.print(prefix + alias);
                        firstAlias = false;
                    }
                }
View Full Code Here

                            method.getAnnotation(NestedCommand.class);

                    Class<?>[] nestedClasses = nested.value();
                    writePermissionsWikiTable(stream,
                            Arrays.asList(nestedClasses),
                            prefix + cmd.aliases()[0] + " ");
                }
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.