for (Method method : plugin.getMethods())
{
if (Annotations.isAnnotationPresent(method, Command.class))
{
Command command = Annotations.getAnnotation(method, Command.class);
CommandMetadataImpl commandMeta = new CommandMetadataImpl();
commandMeta.setMethod(method);
commandMeta.setHelp(command.help());
commandMeta.setParent(pluginMeta);
// Default commands are invoked via the name of the plug-in, not by
// plug-in + command
if ("".equals(command.value()))
{
commandMeta.setName(method.getName().trim().toLowerCase());
}
else
{
commandMeta.setName(command.value());
}
// This works because @DefaultCommand is annotated by @Command
if (Annotations.isAnnotationPresent(method, DefaultCommand.class))
{