}
}.display(sender, CommandBook.inst().getComponentManager().getComponents(), args.getFlagInteger('p', 1));
} else {
final String componentName = args.getString(0).replaceAll(" ", "-").toLowerCase();
AbstractComponent component = CommandBook.inst().getComponentManager().getComponent(componentName);
if (component == null) {
throw new CommandException("No such component: " + componentName);
}
final ComponentInformation info = component.getInformation();
sender.sendMessage(ChatColor.YELLOW + info.friendlyName() + " - " + info.desc());
if (info.authors().length > 0 && info.authors()[0].length() > 0) {
sender.sendMessage(ChatColor.YELLOW + "Authors: " +
Arrays.toString(info.authors()).replaceAll("[(.*)]", "$1"));
}
Map<String, String> commands = component.getCommands();
if (commands.size() > 0) {
new PaginatedResult<Map.Entry<String, String>>(" Command - Description") {
@Override
public String format(Map.Entry<String, String> entry) {
return " /" + entry.getKey() + " " + entry.getValue();