From 62a78994fd0074e1c419d2c14008e38fd5171011 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Fri, 27 May 2011 00:17:51 -0400 Subject: [PATCH] Added permissions node to Documentation Printer. --- .../worldedit/dev/DocumentationPrinter.java | 8 +- src/main/resources/plugin.yml | 636 ++++++++++-------- 2 files changed, 364 insertions(+), 280 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java index 23e28e60d..2871865f4 100644 --- a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java +++ b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java @@ -171,7 +171,7 @@ public class DocumentationPrinter { stream.println("name: WorldEdit"); stream.println("main: com.sk89q.worldedit.bukkit.WorldEditPlugin"); - stream.println("version: \"WEVERSIONMACRO\""); + stream.println("version: ${project.version}"); stream.println("commands:"); for (Class cls : commandClasses) { @@ -192,6 +192,12 @@ public class DocumentationPrinter { + StringUtil.joinQuotedString(cmd.aliases(), ", ", 1, "'") + "]"); } + if (!method.isAnnotationPresent(CommandPermissions.class)) { + continue; + } + CommandPermissions cmdPerms = method.getAnnotation(CommandPermissions.class); + stream.println(" permissions: " + + StringUtil.joinQuotedString(cmdPerms.value(), ", ", 0, "'")); } } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ed33d0920..af7c466ae 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,279 +1,357 @@ -name: WorldEdit -main: com.sk89q.worldedit.bukkit.WorldEditPlugin -version: "${project.version}" -commands: - chunkinfo: - description: Get information about the chunk that you are inside - usage: / - listchunks: - description: List chunks that your selection includes - usage: / - delchunks: - description: Delete chunks that your selection includes - usage: / - clearclipboard: - description: Clear your clipboard - usage: / - /load: - description: Load a schematic into your clipboard - usage: / - /save: - description: Save a schematic into your clipboard - usage: / - /copy: - description: Copy the selection to the clipboard - usage: / - /flip: - description: Flip the contents of the clipboard - usage: / [dir] - /rotate: - description: Rotate the contents of the clipboard - usage: / - /cut: - description: Cut the selection to the clipboard - usage: / [leave-id] - /paste: - description: Paste the clipboard's contents - usage: / [-ao] - we: - description: WorldEdit commands - usage: / - aliases: ['worldedit'] - toggleplace: - description: - usage: / - searchitem: - description: Search for an item - usage: / [-bi] - aliases: ['/l', 'search'] - /limit: - description: Modify block change limit - usage: / - /hcyl: - description: Generate a hollow cylinder - usage: / [height] - /cyl: - description: Generate a cylinder - usage: / [height] - /hsphere: - description: Generate a hollow sphere - usage: / [raised?] - /sphere: - description: Generate a filled sphere - usage: / [raised?] - forestgen: - description: Generate a forest - usage: / [size] [type] [density] - pumpkins: - description: Generate pumpkin patches - usage: / [size] - clearhistory: - description: Clear your history - usage: / - /redo: - description: Redoes the last action (from history) - usage: / [times] - aliases: ['redo'] - /undo: - description: Undoes the last action - usage: / [times] - aliases: ['undo'] - unstuck: - description: Escape from being stuck inside a block - usage: / - ascend: - description: Go up a floor - usage: / - descend: - description: Go down a floor - usage: / - thru: - description: Passthrough walls - usage: / - jumpto: - description: Teleport to a location - usage: / - ceil: - description: Go to the celing - usage: / [clearance] - up: - description: Go upwards some distance - usage: / - /overlay: - description: Set a block on top of blocks in the region - usage: / - /walls: - description: Build the four sides of the selection - usage: / - /faces: - description: Build the walls, ceiling, and roof of a selection - usage: / - aliases: ['/outline'] - /smooth: - description: Smooth the elevation in the selection - usage: / [iterations] - /regen: - description: Regenerates the contents of the selection - usage: / - /replace: - description: Replace all blocks in the selection with another - usage: / [from-block] - /stack: - description: Repeat the contents of the selection - usage: / [-a] [count] [direction] - /set: - description: Set all the blocks inside the selection to a block - usage: / - /move: - description: Move the contents of the selection - usage: / [count] [direction] [leave-id] - .s: - description: Execute last CraftScript - usage: / [args...] - cs: - description: Execute a CraftScript - usage: / [args...] - /chunk: - description: Set the selection to your current chunk - usage: / - /pos1: - description: Set position 1 - usage: / - /pos2: - description: Set position 2 - usage: / - /hpos1: - description: Set position 1 to targeted block - usage: / - /hpos2: - description: Set position 2 to targeted block - usage: / - /wand: - description: Get the wand object - usage: / - toggleeditwand: - description: Toggle functionality of the edit wand - usage: / - /contract: - description: Contract the selection area - usage: / [reverse-amount] [direction] - /outset: - description: Outset the selection area - usage: / [-hv] - /distr: - description: Get the distribution of blocks in the selection - usage: / [-c] - /count: - description: Counts the number of a certain type of block - usage: / - /size: - description: Get information about the selection - usage: / - /shift: - description: Shift the selection area - usage: / [direction] - /expand: - description: Expand the selection area - usage: / [reverse-amount] - /sel: - description: Choose a region selector - usage: / [type] - aliases: [','] - /inset: - description: Inset the selection area - usage: / [-hv] - snapshot: - description: Snapshot commands - usage: / - aliases: ['snap'] - restore: - description: Restore the selection from a snapshot - usage: / [snapshot] - aliases: ['/restore'] - /: - description: Toggle the super pickaxe pickaxe function - usage: / - aliases: [','] - superpickaxe: - description: Select super pickaxe mode - usage: / - aliases: ['pickaxe', 'sp'] - tool: - description: Select a tool to bind - usage: / - mat: - description: Set the brush material - usage: / [pattern] - aliases: ['material', 'fill'] - size: - description: Set the brush size - usage: / [pattern] - mask: - description: Set the brush mask - usage: / [mask] - none: - description: Turn off all superpickaxe alternate modes - usage: / - repl: - description: Block replacer tool - usage: / - cycler: - description: Block data cycler tool - usage: / - brush: - description: Brush tool - usage: / - aliases: ['br'] - info: - description: Block information tool - usage: / - tree: - description: Tree generator tool - usage: / [type] - deltree: - description: Floating tree remover tool - usage: / - /fillr: - description: Fill a hole recursively - usage: / [depth] - fixlava: - description: Fix lava to be stationary - usage: / - fixwater: - description: Fix water to be stationary - usage: / - removeabove: - description: Remove blocks above your head. - usage: / [size] [height] - removebelow: - description: Remove blocks below your head. - usage: / [size] [height] - removenear: - description: Remove blocks near you. - usage: / [size] - replacenear: - description: Replace nearby blocks - usage: / - snow: - description: Simulates snow - usage: / [radius] - thaw: - description: Thaws the area - usage: / [radius] - ex: - description: Extinguish nearby fire - usage: / [radius] - aliases: ['ext', 'extinguish'] - butcher: - description: Kill all or nearby mobs - usage: / [radius] - remove: - description: Remove all entities of a type - usage: / - aliases: ['rem', 'rement'] - /fill: - description: Fill a hole - usage: / [depth] - /drain: - description: Drain a pool - usage: / +name: WorldEdit +main: com.sk89q.worldedit.bukkit.WorldEditPlugin +version: ${project.version} +commands: + chunkinfo: + description: Get information about the chunk that you are inside + usage: / + permissions: 'worldedit.chunkinfo' + listchunks: + description: List chunks that your selection includes + usage: / + permissions: 'worldedit.listchunks' + delchunks: + description: Delete chunks that your selection includes + usage: / + permissions: 'worldedit.delchunks' + /load: + description: Load a schematic into your clipboard + usage: / + permissions: 'worldedit.clipboard.load' + /save: + description: Save a schematic into your clipboard + usage: / + permissions: 'worldedit.clipboard.save' + /copy: + description: Copy the selection to the clipboard + usage: / + permissions: 'worldedit.clipboard.copy' + /flip: + description: Flip the contents of the clipboard + usage: / [dir] + permissions: 'worldedit.clipboard.flip' + /rotate: + description: Rotate the contents of the clipboard + usage: / + permissions: 'worldedit.clipboard.rotate' + /cut: + description: Cut the selection to the clipboard + usage: / [leave-id] + permissions: 'worldedit.clipboard.cut' + /paste: + description: Paste the clipboard's contents + usage: / [-ao] + permissions: 'worldedit.clipboard.paste' + clearclipboard: + description: Clear your clipboard + usage: / + permissions: 'worldedit.clipboard.clear' + /limit: + description: Modify block change limit + usage: / + permissions: 'worldedit.limit' + we: + description: WorldEdit commands + usage: / + aliases: ['worldedit'] + toggleplace: + description: + usage: / + searchitem: + description: Search for an item + usage: / [-bi] + aliases: ['/l', 'search'] + /hcyl: + description: Generate a hollow cylinder + usage: / [height] + permissions: 'worldedit.generation.cylinder' + /cyl: + description: Generate a cylinder + usage: / [height] + permissions: 'worldedit.generation.cylinder' + /hsphere: + description: Generate a hollow sphere + usage: / [raised?] + permissions: 'worldedit.generation.sphere' + /sphere: + description: Generate a filled sphere + usage: / [raised?] + permissions: 'worldedit.generation.sphere' + forestgen: + description: Generate a forest + usage: / [size] [type] [density] + permissions: 'worldedit.generation.forest' + pumpkins: + description: Generate pumpkin patches + usage: / [size] + permissions: 'worldedit.generation.pumpkins' + /undo: + description: Undoes the last action + usage: / [times] + aliases: ['undo'] + permissions: 'worldedit.history.undo' + /redo: + description: Redoes the last action (from history) + usage: / [times] + aliases: ['redo'] + permissions: 'worldedit.history.redo' + clearhistory: + description: Clear your history + usage: / + permissions: 'worldedit.history.clear' + unstuck: + description: Escape from being stuck inside a block + usage: / + permissions: 'worldedit.navigation.unstuck' + ascend: + description: Go up a floor + usage: / + permissions: 'worldedit.navigation.ascend' + descend: + description: Go down a floor + usage: / + permissions: 'worldedit.navigation.descend' + ceil: + description: Go to the celing + usage: / [clearance] + permissions: 'worldedit.navigation.ceiling' + thru: + description: Passthrough walls + usage: / + permissions: 'worldedit.navigation.thru' + jumpto: + description: Teleport to a location + usage: / + permissions: 'worldedit.navigation.jumpto' + up: + description: Go upwards some distance + usage: / + permissions: 'worldedit.navigation.up' + /replace: + description: Replace all blocks in the selection with another + usage: / [from-block] + permissions: 'worldedit.region.replace' + /stack: + description: Repeat the contents of the selection + usage: / [-sa] [count] [direction] + permissions: 'worldedit.region.stack' + /set: + description: Set all the blocks inside the selection to a block + usage: / + permissions: 'worldedit.region.set' + /overlay: + description: Set a block on top of blocks in the region + usage: / + permissions: 'worldedit.region.overlay' + /walls: + description: Build the four sides of the selection + usage: / + permissions: 'worldedit.region.walls' + /faces: + description: Build the walls, ceiling, and roof of a selection + usage: / + aliases: ['/outline'] + permissions: 'worldedit.region.faces' + /smooth: + description: Smooth the elevation in the selection + usage: / [iterations] + permissions: 'worldedit.region.smooth' + /move: + description: Move the contents of the selection + usage: / [-s] [count] [direction] [leave-id] + permissions: 'worldedit.region.move' + /regen: + description: Regenerates the contents of the selection + usage: / + permissions: 'worldedit.regen' + cs: + description: Execute a CraftScript + usage: / [args...] + permissions: 'worldedit.scripting.execute' + .s: + description: Execute last CraftScript + usage: / [args...] + permissions: 'worldedit.scripting.execute' + /count: + description: Counts the number of a certain type of block + usage: / + permissions: 'worldedit.analysis.count' + /size: + description: Get information about the selection + usage: / + permissions: 'worldedit.selection.size' + /shift: + description: Shift the selection area + usage: / [direction] + permissions: 'worldedit.selection.shift' + /chunk: + description: Set the selection to your current chunk + usage: / + permissions: 'worldedit.selection.chunk' + /expand: + description: Expand the selection area + usage: / [reverse-amount] + permissions: 'worldedit.selection.expand' + /contract: + description: Contract the selection area + usage: / [reverse-amount] [direction] + permissions: 'worldedit.selection.contract' + /pos1: + description: Set position 1 + usage: / + permissions: 'worldedit.selection.pos' + /pos2: + description: Set position 2 + usage: / + permissions: 'worldedit.selection.pos' + /hpos1: + description: Set position 1 to targeted block + usage: / + permissions: 'worldedit.selection.hpos' + /hpos2: + description: Set position 2 to targeted block + usage: / + permissions: 'worldedit.selection.hpos' + /wand: + description: Get the wand object + usage: / + permissions: 'worldedit.wand' + toggleeditwand: + description: Toggle functionality of the edit wand + usage: / + permissions: 'worldedit.wand.toggle' + /outset: + description: Outset the selection area + usage: / [-hv] + permissions: 'worldedit.selection.outset' + /inset: + description: Inset the selection area + usage: / [-hv] + permissions: 'worldedit.selection.inset' + /distr: + description: Get the distribution of blocks in the selection + usage: / [-c] + permissions: 'worldedit.analysis.distr' + /sel: + description: Choose a region selector + usage: / [type] + aliases: [','] + snapshot: + description: Snapshot commands + usage: / + aliases: ['snap'] + restore: + description: Restore the selection from a snapshot + usage: / [snapshot] + aliases: ['/restore'] + permissions: 'worldedit.snapshots.restore' + size: + description: Set the brush size + usage: / [pattern] + permissions: 'worldedit.brush.options.size' + mask: + description: Set the brush mask + usage: / [mask] + permissions: 'worldedit.brush.options.mask' + /: + description: Toggle the super pickaxe pickaxe function + usage: / + aliases: [','] + permissions: 'worldedit.superpickaxe' + superpickaxe: + description: Select super pickaxe mode + usage: / + aliases: ['pickaxe', 'sp'] + tool: + description: Select a tool to bind + usage: / + mat: + description: Set the brush material + usage: / [pattern] + aliases: ['material', 'fill'] + permissions: 'worldedit.brush.options.material' + info: + description: Block information tool + usage: / + permissions: 'worldedit.tool.info' + none: + description: Turn off all superpickaxe alternate modes + usage: / + tree: + description: Tree generator tool + usage: / [type] + permissions: 'worldedit.tool.tree' + repl: + description: Block replacer tool + usage: / + permissions: 'worldedit.tool.replacer' + cycler: + description: Block data cycler tool + usage: / + permissions: 'worldedit.tool.data-cycler' + brush: + description: Brush tool + usage: / + aliases: ['br'] + deltree: + description: Floating tree remover tool + usage: / + permissions: 'worldedit.tool.deltree' + remove: + description: Remove all entities of a type + usage: / + aliases: ['rem', 'rement'] + permissions: 'worldedit.remove' + /fill: + description: Fill a hole + usage: / [depth] + permissions: 'worldedit.fill' + /fillr: + description: Fill a hole recursively + usage: / [depth] + permissions: 'worldedit.fill.recursive' + /drain: + description: Drain a pool + usage: / + permissions: 'worldedit.drain' + fixlava: + description: Fix lava to be stationary + usage: / + permissions: 'worldedit.fixlava' + fixwater: + description: Fix water to be stationary + usage: / + permissions: 'worldedit.fixwater' + removeabove: + description: Remove blocks above your head. + usage: / [size] [height] + permissions: 'worldedit.removeabove' + removebelow: + description: Remove blocks below your head. + usage: / [size] [height] + permissions: 'worldedit.removebelow' + removenear: + description: Remove blocks near you. + usage: / [size] + permissions: 'worldedit.removenear' + replacenear: + description: Replace nearby blocks + usage: / + permissions: 'worldedit.replacenear' + snow: + description: Simulates snow + usage: / [radius] + permissions: 'worldedit.snow' + thaw: + description: Thaws the area + usage: / [radius] + permissions: 'worldedit.thaw' + ex: + description: Extinguish nearby fire + usage: / [radius] + aliases: ['ext', 'extinguish'] + permissions: 'worldedit.extinguish' + butcher: + description: Kill all or nearby mobs + usage: / [-p] [radius] + permissions: 'worldedit.butcher'