Added permissions node to Documentation Printer.

Dieser Commit ist enthalten in:
Wizjany 2011-05-27 00:17:51 -04:00
Ursprung 4c532d9772
Commit 62a78994fd
2 geänderte Dateien mit 364 neuen und 280 gelöschten Zeilen

Datei anzeigen

@ -171,7 +171,7 @@ public class DocumentationPrinter {
stream.println("name: WorldEdit"); stream.println("name: WorldEdit");
stream.println("main: com.sk89q.worldedit.bukkit.WorldEditPlugin"); stream.println("main: com.sk89q.worldedit.bukkit.WorldEditPlugin");
stream.println("version: \"WEVERSIONMACRO\""); stream.println("version: ${project.version}");
stream.println("commands:"); stream.println("commands:");
for (Class<?> cls : commandClasses) { for (Class<?> cls : commandClasses) {
@ -192,6 +192,12 @@ public class DocumentationPrinter {
+ StringUtil.joinQuotedString(cmd.aliases(), ", ", 1, "'") + 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, "'"));
} }
} }
} }

Datei anzeigen

@ -1,40 +1,55 @@
name: WorldEdit name: WorldEdit
main: com.sk89q.worldedit.bukkit.WorldEditPlugin main: com.sk89q.worldedit.bukkit.WorldEditPlugin
version: "${project.version}" version: ${project.version}
commands: commands:
chunkinfo: chunkinfo:
description: Get information about the chunk that you are inside description: Get information about the chunk that you are inside
usage: /<command> usage: /<command>
permissions: 'worldedit.chunkinfo'
listchunks: listchunks:
description: List chunks that your selection includes description: List chunks that your selection includes
usage: /<command> usage: /<command>
permissions: 'worldedit.listchunks'
delchunks: delchunks:
description: Delete chunks that your selection includes description: Delete chunks that your selection includes
usage: /<command> usage: /<command>
clearclipboard: permissions: 'worldedit.delchunks'
description: Clear your clipboard
usage: /<command>
/load: /load:
description: Load a schematic into your clipboard description: Load a schematic into your clipboard
usage: /<command> <filename> usage: /<command> <filename>
permissions: 'worldedit.clipboard.load'
/save: /save:
description: Save a schematic into your clipboard description: Save a schematic into your clipboard
usage: /<command> <filename> usage: /<command> <filename>
permissions: 'worldedit.clipboard.save'
/copy: /copy:
description: Copy the selection to the clipboard description: Copy the selection to the clipboard
usage: /<command> usage: /<command>
permissions: 'worldedit.clipboard.copy'
/flip: /flip:
description: Flip the contents of the clipboard description: Flip the contents of the clipboard
usage: /<command> [dir] usage: /<command> [dir]
permissions: 'worldedit.clipboard.flip'
/rotate: /rotate:
description: Rotate the contents of the clipboard description: Rotate the contents of the clipboard
usage: /<command> <angle-in-degrees> usage: /<command> <angle-in-degrees>
permissions: 'worldedit.clipboard.rotate'
/cut: /cut:
description: Cut the selection to the clipboard description: Cut the selection to the clipboard
usage: /<command> [leave-id] usage: /<command> [leave-id]
permissions: 'worldedit.clipboard.cut'
/paste: /paste:
description: Paste the clipboard's contents description: Paste the clipboard's contents
usage: /<command> [-ao] usage: /<command> [-ao]
permissions: 'worldedit.clipboard.paste'
clearclipboard:
description: Clear your clipboard
usage: /<command>
permissions: 'worldedit.clipboard.clear'
/limit:
description: Modify block change limit
usage: /<command> <limit>
permissions: 'worldedit.limit'
we: we:
description: WorldEdit commands description: WorldEdit commands
usage: /<command> usage: /<command>
@ -46,142 +61,181 @@ commands:
description: Search for an item description: Search for an item
usage: /<command> [-bi] <query> usage: /<command> [-bi] <query>
aliases: ['/l', 'search'] aliases: ['/l', 'search']
/limit:
description: Modify block change limit
usage: /<command> <limit>
/hcyl: /hcyl:
description: Generate a hollow cylinder description: Generate a hollow cylinder
usage: /<command> <block> <radius> [height] usage: /<command> <block> <radius> [height]
permissions: 'worldedit.generation.cylinder'
/cyl: /cyl:
description: Generate a cylinder description: Generate a cylinder
usage: /<command> <block> <radius> [height] usage: /<command> <block> <radius> [height]
permissions: 'worldedit.generation.cylinder'
/hsphere: /hsphere:
description: Generate a hollow sphere description: Generate a hollow sphere
usage: /<command> <block> <radius> [raised?] usage: /<command> <block> <radius> [raised?]
permissions: 'worldedit.generation.sphere'
/sphere: /sphere:
description: Generate a filled sphere description: Generate a filled sphere
usage: /<command> <block> <radius> [raised?] usage: /<command> <block> <radius> [raised?]
permissions: 'worldedit.generation.sphere'
forestgen: forestgen:
description: Generate a forest description: Generate a forest
usage: /<command> [size] [type] [density] usage: /<command> [size] [type] [density]
permissions: 'worldedit.generation.forest'
pumpkins: pumpkins:
description: Generate pumpkin patches description: Generate pumpkin patches
usage: /<command> [size] usage: /<command> [size]
clearhistory: permissions: 'worldedit.generation.pumpkins'
description: Clear your history
usage: /<command>
/redo:
description: Redoes the last action (from history)
usage: /<command> [times]
aliases: ['redo']
/undo: /undo:
description: Undoes the last action description: Undoes the last action
usage: /<command> [times] usage: /<command> [times]
aliases: ['undo'] aliases: ['undo']
permissions: 'worldedit.history.undo'
/redo:
description: Redoes the last action (from history)
usage: /<command> [times]
aliases: ['redo']
permissions: 'worldedit.history.redo'
clearhistory:
description: Clear your history
usage: /<command>
permissions: 'worldedit.history.clear'
unstuck: unstuck:
description: Escape from being stuck inside a block description: Escape from being stuck inside a block
usage: /<command> usage: /<command>
permissions: 'worldedit.navigation.unstuck'
ascend: ascend:
description: Go up a floor description: Go up a floor
usage: /<command> usage: /<command>
permissions: 'worldedit.navigation.ascend'
descend: descend:
description: Go down a floor description: Go down a floor
usage: /<command> usage: /<command>
thru: permissions: 'worldedit.navigation.descend'
description: Passthrough walls
usage: /<command>
jumpto:
description: Teleport to a location
usage: /<command>
ceil: ceil:
description: Go to the celing description: Go to the celing
usage: /<command> [clearance] usage: /<command> [clearance]
permissions: 'worldedit.navigation.ceiling'
thru:
description: Passthrough walls
usage: /<command>
permissions: 'worldedit.navigation.thru'
jumpto:
description: Teleport to a location
usage: /<command>
permissions: 'worldedit.navigation.jumpto'
up: up:
description: Go upwards some distance description: Go upwards some distance
usage: /<command> <block> usage: /<command> <block>
permissions: 'worldedit.navigation.up'
/replace:
description: Replace all blocks in the selection with another
usage: /<command> [from-block] <to-block>
permissions: 'worldedit.region.replace'
/stack:
description: Repeat the contents of the selection
usage: /<command> [-sa] [count] [direction]
permissions: 'worldedit.region.stack'
/set:
description: Set all the blocks inside the selection to a block
usage: /<command> <block>
permissions: 'worldedit.region.set'
/overlay: /overlay:
description: Set a block on top of blocks in the region description: Set a block on top of blocks in the region
usage: /<command> <block> usage: /<command> <block>
permissions: 'worldedit.region.overlay'
/walls: /walls:
description: Build the four sides of the selection description: Build the four sides of the selection
usage: /<command> <block> usage: /<command> <block>
permissions: 'worldedit.region.walls'
/faces: /faces:
description: Build the walls, ceiling, and roof of a selection description: Build the walls, ceiling, and roof of a selection
usage: /<command> <block> usage: /<command> <block>
aliases: ['/outline'] aliases: ['/outline']
permissions: 'worldedit.region.faces'
/smooth: /smooth:
description: Smooth the elevation in the selection description: Smooth the elevation in the selection
usage: /<command> [iterations] usage: /<command> [iterations]
permissions: 'worldedit.region.smooth'
/move:
description: Move the contents of the selection
usage: /<command> [-s] [count] [direction] [leave-id]
permissions: 'worldedit.region.move'
/regen: /regen:
description: Regenerates the contents of the selection description: Regenerates the contents of the selection
usage: /<command> usage: /<command>
/replace: permissions: 'worldedit.regen'
description: Replace all blocks in the selection with another
usage: /<command> [from-block] <to-block>
/stack:
description: Repeat the contents of the selection
usage: /<command> [-a] [count] [direction]
/set:
description: Set all the blocks inside the selection to a block
usage: /<command> <block>
/move:
description: Move the contents of the selection
usage: /<command> [count] [direction] [leave-id]
.s:
description: Execute last CraftScript
usage: /<command> [args...]
cs: cs:
description: Execute a CraftScript description: Execute a CraftScript
usage: /<command> <filename> [args...] usage: /<command> <filename> [args...]
/chunk: permissions: 'worldedit.scripting.execute'
description: Set the selection to your current chunk .s:
usage: /<command> description: Execute last CraftScript
/pos1: usage: /<command> [args...]
description: Set position 1 permissions: 'worldedit.scripting.execute'
usage: /<command>
/pos2:
description: Set position 2
usage: /<command>
/hpos1:
description: Set position 1 to targeted block
usage: /<command>
/hpos2:
description: Set position 2 to targeted block
usage: /<command>
/wand:
description: Get the wand object
usage: /<command>
toggleeditwand:
description: Toggle functionality of the edit wand
usage: /<command>
/contract:
description: Contract the selection area
usage: /<command> <amount> [reverse-amount] [direction]
/outset:
description: Outset the selection area
usage: /<command> [-hv] <amount>
/distr:
description: Get the distribution of blocks in the selection
usage: /<command> [-c]
/count: /count:
description: Counts the number of a certain type of block description: Counts the number of a certain type of block
usage: /<command> <block> usage: /<command> <block>
permissions: 'worldedit.analysis.count'
/size: /size:
description: Get information about the selection description: Get information about the selection
usage: /<command> usage: /<command>
permissions: 'worldedit.selection.size'
/shift: /shift:
description: Shift the selection area description: Shift the selection area
usage: /<command> <amount> [direction] usage: /<command> <amount> [direction]
permissions: 'worldedit.selection.shift'
/chunk:
description: Set the selection to your current chunk
usage: /<command>
permissions: 'worldedit.selection.chunk'
/expand: /expand:
description: Expand the selection area description: Expand the selection area
usage: /<command> <amount> [reverse-amount] <direction> usage: /<command> <amount> [reverse-amount] <direction>
permissions: 'worldedit.selection.expand'
/contract:
description: Contract the selection area
usage: /<command> <amount> [reverse-amount] [direction]
permissions: 'worldedit.selection.contract'
/pos1:
description: Set position 1
usage: /<command>
permissions: 'worldedit.selection.pos'
/pos2:
description: Set position 2
usage: /<command>
permissions: 'worldedit.selection.pos'
/hpos1:
description: Set position 1 to targeted block
usage: /<command>
permissions: 'worldedit.selection.hpos'
/hpos2:
description: Set position 2 to targeted block
usage: /<command>
permissions: 'worldedit.selection.hpos'
/wand:
description: Get the wand object
usage: /<command>
permissions: 'worldedit.wand'
toggleeditwand:
description: Toggle functionality of the edit wand
usage: /<command>
permissions: 'worldedit.wand.toggle'
/outset:
description: Outset the selection area
usage: /<command> [-hv] <amount>
permissions: 'worldedit.selection.outset'
/inset:
description: Inset the selection area
usage: /<command> [-hv] <amount>
permissions: 'worldedit.selection.inset'
/distr:
description: Get the distribution of blocks in the selection
usage: /<command> [-c]
permissions: 'worldedit.analysis.distr'
/sel: /sel:
description: Choose a region selector description: Choose a region selector
usage: /<command> [type] usage: /<command> [type]
aliases: [','] aliases: [',']
/inset:
description: Inset the selection area
usage: /<command> [-hv] <amount>
snapshot: snapshot:
description: Snapshot commands description: Snapshot commands
usage: /<command> usage: /<command>
@ -190,10 +244,20 @@ commands:
description: Restore the selection from a snapshot description: Restore the selection from a snapshot
usage: /<command> [snapshot] usage: /<command> [snapshot]
aliases: ['/restore'] aliases: ['/restore']
permissions: 'worldedit.snapshots.restore'
size:
description: Set the brush size
usage: /<command> [pattern]
permissions: 'worldedit.brush.options.size'
mask:
description: Set the brush mask
usage: /<command> [mask]
permissions: 'worldedit.brush.options.mask'
/: /:
description: Toggle the super pickaxe pickaxe function description: Toggle the super pickaxe pickaxe function
usage: /<command> usage: /<command>
aliases: [','] aliases: [',']
permissions: 'worldedit.superpickaxe'
superpickaxe: superpickaxe:
description: Select super pickaxe mode description: Select super pickaxe mode
usage: /<command> usage: /<command>
@ -205,75 +269,89 @@ commands:
description: Set the brush material description: Set the brush material
usage: /<command> [pattern] usage: /<command> [pattern]
aliases: ['material', 'fill'] aliases: ['material', 'fill']
size: permissions: 'worldedit.brush.options.material'
description: Set the brush size
usage: /<command> [pattern]
mask:
description: Set the brush mask
usage: /<command> [mask]
none:
description: Turn off all superpickaxe alternate modes
usage: /<command>
repl:
description: Block replacer tool
usage: /<command> <block>
cycler:
description: Block data cycler tool
usage: /<command>
brush:
description: Brush tool
usage: /<command>
aliases: ['br']
info: info:
description: Block information tool description: Block information tool
usage: /<command> usage: /<command>
permissions: 'worldedit.tool.info'
none:
description: Turn off all superpickaxe alternate modes
usage: /<command>
tree: tree:
description: Tree generator tool description: Tree generator tool
usage: /<command> [type] usage: /<command> [type]
permissions: 'worldedit.tool.tree'
repl:
description: Block replacer tool
usage: /<command> <block>
permissions: 'worldedit.tool.replacer'
cycler:
description: Block data cycler tool
usage: /<command>
permissions: 'worldedit.tool.data-cycler'
brush:
description: Brush tool
usage: /<command>
aliases: ['br']
deltree: deltree:
description: Floating tree remover tool description: Floating tree remover tool
usage: /<command> usage: /<command>
/fillr: permissions: 'worldedit.tool.deltree'
description: Fill a hole recursively
usage: /<command> <block> <radius> [depth]
fixlava:
description: Fix lava to be stationary
usage: /<command> <radius>
fixwater:
description: Fix water to be stationary
usage: /<command> <radius>
removeabove:
description: Remove blocks above your head.
usage: /<command> [size] [height]
removebelow:
description: Remove blocks below your head.
usage: /<command> [size] [height]
removenear:
description: Remove blocks near you.
usage: /<command> <block> [size]
replacenear:
description: Replace nearby blocks
usage: /<command> <size> <from-id> <to-id>
snow:
description: Simulates snow
usage: /<command> [radius]
thaw:
description: Thaws the area
usage: /<command> [radius]
ex:
description: Extinguish nearby fire
usage: /<command> [radius]
aliases: ['ext', 'extinguish']
butcher:
description: Kill all or nearby mobs
usage: /<command> [radius]
remove: remove:
description: Remove all entities of a type description: Remove all entities of a type
usage: /<command> <type> <radius> usage: /<command> <type> <radius>
aliases: ['rem', 'rement'] aliases: ['rem', 'rement']
permissions: 'worldedit.remove'
/fill: /fill:
description: Fill a hole description: Fill a hole
usage: /<command> <block> <radius> [depth] usage: /<command> <block> <radius> [depth]
permissions: 'worldedit.fill'
/fillr:
description: Fill a hole recursively
usage: /<command> <block> <radius> [depth]
permissions: 'worldedit.fill.recursive'
/drain: /drain:
description: Drain a pool description: Drain a pool
usage: /<command> <radius> usage: /<command> <radius>
permissions: 'worldedit.drain'
fixlava:
description: Fix lava to be stationary
usage: /<command> <radius>
permissions: 'worldedit.fixlava'
fixwater:
description: Fix water to be stationary
usage: /<command> <radius>
permissions: 'worldedit.fixwater'
removeabove:
description: Remove blocks above your head.
usage: /<command> [size] [height]
permissions: 'worldedit.removeabove'
removebelow:
description: Remove blocks below your head.
usage: /<command> [size] [height]
permissions: 'worldedit.removebelow'
removenear:
description: Remove blocks near you.
usage: /<command> <block> [size]
permissions: 'worldedit.removenear'
replacenear:
description: Replace nearby blocks
usage: /<command> <size> <from-id> <to-id>
permissions: 'worldedit.replacenear'
snow:
description: Simulates snow
usage: /<command> [radius]
permissions: 'worldedit.snow'
thaw:
description: Thaws the area
usage: /<command> [radius]
permissions: 'worldedit.thaw'
ex:
description: Extinguish nearby fire
usage: /<command> [radius]
aliases: ['ext', 'extinguish']
permissions: 'worldedit.extinguish'
butcher:
description: Kill all or nearby mobs
usage: /<command> [-p] [radius]
permissions: 'worldedit.butcher'