From d804144c2763e298a3d3e2a53fd57a393aa8e876 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sat, 24 Dec 2011 22:38:51 -0800 Subject: [PATCH] Removed command plugin.ymling from DocumentationPrinter --- .../worldedit/dev/DocumentationPrinter.java | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java index f08f57933..803af0227 100644 --- a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java +++ b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java @@ -51,7 +51,7 @@ public class DocumentationPrinter { System.out.println("Writing permissions wiki table..."); writePermissionsWikiTable(commandClasses); System.out.println("Writing Bukkit plugin.yml..."); - writeBukkitYAML(commandClasses); + writeBukkitYAML(); System.out.println("Done!"); } @@ -175,13 +175,13 @@ public class DocumentationPrinter { } } - private static void writeBukkitYAML(List> commandClasses) + private static void writeBukkitYAML() throws IOException { FileOutputStream stream = null; try { stream = new FileOutputStream("plugin.yml"); PrintStream print = new PrintStream(stream); - _writeBukkitYAML(print, commandClasses); + _writeBukkitYAML(print); } finally { if (stream != null) { stream.close(); @@ -189,34 +189,11 @@ public class DocumentationPrinter { } } - private static void _writeBukkitYAML(PrintStream stream, - List> commandClasses) { + private static void _writeBukkitYAML(PrintStream stream) { stream.println("name: WorldEdit"); stream.println("main: com.sk89q.worldedit.bukkit.WorldEditPlugin"); stream.println("version: ${project.version}"); - stream.println("commands:"); - - for (Class cls : commandClasses) { - for (Method method : cls.getMethods()) { - if (!method.isAnnotationPresent(Command.class)) { - continue; - } - - Command cmd = method.getAnnotation(Command.class); - - stream.println(" " + cmd.aliases()[0] + ":"); - stream.println(" description: " + cmd.desc()); - stream.println(" usage: /" - + (cmd.flags().length() > 0 ? " [-" + cmd.flags() + "]" : "") - + (cmd.usage().length() > 0 ? " " + cmd.usage() : "")); - if (cmd.aliases().length > 1) { - stream.println(" aliases: [" - + StringUtil.joinQuotedString(cmd.aliases(), ", ", 1, "'") - + "]"); - } - } - } stream.println(); stream.println();