From 709cae19951bb7fec54bf0f7f6c73b8c675a42fe Mon Sep 17 00:00:00 2001 From: Wizjany Date: Sun, 18 Sep 2011 01:29:12 -0400 Subject: [PATCH] Removed permissions from plugin.yml for compatibility and cleaned up a bit more. --- .../worldedit/commands/UtilityCommands.java | 2 +- .../worldedit/dev/DocumentationPrinter.java | 8 +- src/main/resources/plugin.yml | 97 ++----------------- 3 files changed, 9 insertions(+), 98 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java index c4e24d632..51334cf3a 100644 --- a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java @@ -182,7 +182,7 @@ public class UtilityCommands { @Command( aliases = {"/removebelow", "removebelow"}, - usage = "[size] [height] ", + usage = "[size] [height]", desc = "Remove blocks below you.", min = 0, max = 2 diff --git a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java index 41f73c754..2caec2bd3 100644 --- a/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java +++ b/src/main/java/com/sk89q/worldedit/dev/DocumentationPrinter.java @@ -186,18 +186,12 @@ public class DocumentationPrinter { stream.println(" description: " + cmd.desc()); stream.println(" usage: /" + (cmd.flags().length() > 0 ? " [-" + cmd.flags() + "]" : "") - + " " + cmd.usage()); + + (cmd.usage().length() > 0 ? " " + cmd.usage() : "")); if (cmd.aliases().length > 1) { stream.println(" aliases: [" + 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 c6f7a6c15..5eebff0e8 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -5,56 +5,43 @@ 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: / [-p] [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' /gmask: description: Set the global mask usage: / [mask] aliases: ['gmask'] - permissions: 'worldedit.global-mask' we: description: WorldEdit commands usage: / @@ -62,9 +49,8 @@ commands: /fast: description: Toggle fast mode usage: / - permissions: 'worldedit.fast' /toggleplace: - description: + description: Switch between your position and pos1 for placement usage: / aliases: ['toggleplace'] /searchitem: @@ -74,188 +60,143 @@ commands: /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: / [-q] [,,] [raised?] - permissions: 'worldedit.generation.sphere' /sphere: description: Generate a filled sphere. usage: / [-q] [,,] [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' /pyramid: description: Generate a filled pyramid usage: / - permissions: 'worldedit.generation.pyramid' /hpyramid: description: Generate a hollow pyramid usage: / - permissions: 'worldedit.generation.pyramid' /undo: description: Undoes the last action usage: / [times] [player] aliases: ['undo'] - permissions: 'worldedit.history.undo' /redo: description: Redoes the last action (from history) usage: / [times] [player] aliases: ['redo'] - permissions: 'worldedit.history.redo' /clearhistory: description: Clear your history usage: / aliases: ['clearhistory'] - permissions: 'worldedit.history.clear' unstuck: description: Escape from being stuck inside a block usage: / aliases: ['!'] - permissions: 'worldedit.navigation.unstuck' ascend: description: Go up a floor usage: / [# of levels] - permissions: 'worldedit.navigation.ascend' descend: description: Go down a floor usage: / [# of floors] - 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' /naturalize: description: 3 layers of dirt on top then rock below usage: / - permissions: 'worldedit.region.naturalize' /walls: description: Build the four sides of the selection usage: / - permissions: 'worldedit.region.walls' /faces: description: Build the walls, ceiling, and floor of a selection usage: / aliases: ['/outline'] - permissions: 'worldedit.region.faces' /smooth: description: Smooth the elevation in the selection usage: / [-n] [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. The -s flag extends your current selection to the encompassed chunks. + description: Set the selection to your current chunk. usage: / [-s] - 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: / [coordinates] - permissions: 'worldedit.selection.pos' /pos2: description: Set position 2 usage: / [coordinates] - 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] @@ -268,20 +209,16 @@ commands: 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: / [on|off] aliases: [','] - permissions: 'worldedit.superpickaxe' superpickaxe: description: Select super pickaxe mode usage: / @@ -293,35 +230,28 @@ commands: description: Set the brush material usage: / [pattern] aliases: ['material', 'fill'] - permissions: 'worldedit.brush.options.material' range: description: Set the brush range usage: / [pattern] - permissions: 'worldedit.brush.options.range' 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' floodfill: description: Flood fill tool usage: / aliases: ['flood'] - permissions: 'worldedit.tool.flood-fill' brush: description: Brush tool usage: / @@ -329,79 +259,66 @@ commands: deltree: description: Floating tree remover tool usage: / - permissions: 'worldedit.tool.deltree' farwand: description: Wand at a distance tool usage: / - permissions: 'worldedit.tool.farwand' 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: / aliases: ['fixlava'] - permissions: 'worldedit.fixlava' /fixwater: description: Fix water to be stationary usage: / aliases: ['fixwater'] - permissions: 'worldedit.fixwater' /removeabove: description: Remove blocks above your head. usage: / [size] [height] aliases: ['removeabove'] - permissions: 'worldedit.removeabove' /removebelow: - description: Remove blocks below your head. + description: Remove blocks below you. usage: / [size] [height] aliases: ['removebelow'] - permissions: 'worldedit.removebelow' /removenear: description: Remove blocks near you. usage: / [size] aliases: ['removenear'] - permissions: 'worldedit.removenear' /replacenear: description: Replace nearby blocks usage: / aliases: ['replacenear'] - permissions: 'worldedit.replacenear' /snow: description: Simulates snow usage: / [radius] aliases: ['snow'] - permissions: 'worldedit.snow' /thaw: description: Thaws the area usage: / [radius] aliases: ['thaw'] - permissions: 'worldedit.thaw' /green: description: Greens the area usage: / [radius] aliases: ['green'] - permissions: 'worldedit.green' /ex: description: Extinguish nearby fire usage: / [radius] aliases: ['/ext', '/extinguish', 'ex', 'ext', 'extinguish'] - permissions: 'worldedit.extinguish' butcher: description: Kill all or nearby mobs usage: / [-p] [radius] - permissions: 'worldedit.butcher' + + +# Permissions aren't here. Read http://wiki.sk89q.com/wiki/WEPIF/DinnerPerms +# for how WorldEdit permissions actually work.