private void listPluginInfoForSender(ICommandSender sender, String[] arguments) {
if (arguments.length < 3)
throw new WrongUsageException("/" + getCommandName() + " plugins info <plugin-name>");
ForestryPlugin found = null;
for (PluginManager.Module pluginModule : PluginManager.getLoadedModules()) {
Plugin info = pluginModule.instance().getClass().getAnnotation(Plugin.class);
if (info == null)
continue;
if ((info.pluginID().equalsIgnoreCase(arguments[2]) || info.name().equalsIgnoreCase(arguments[2]))) {
found = pluginModule.instance();
break;
}
}
if (found == null)
throw new CommandException(StringUtil.localizeAndFormat("chat.plugins.error", arguments[2]));
String entry = "\u00A7c";
if (found.isAvailable())
entry = "\u00A7a";
Plugin info = found.getClass().getAnnotation(Plugin.class);
if (info != null) {
sendChatMessage(sender, entry + "Plugin: " + info.name());
if (!info.version().isEmpty())
sendChatMessage(sender, "\u00A79Version: " + info.version());
if (!info.author().isEmpty())