From 059f30808d3f00ca11ea391f8534b5bdf50ef693 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 29 Jan 2011 11:36:28 -0800 Subject: [PATCH] Added command flag support, removed / prefix from command handling process. --- src/com/sk89q/util/commands/Command.java | 1 + .../sk89q/util/commands/CommandContext.java | 31 ++++++++++++++++++- src/com/sk89q/worldedit/WorldEdit.java | 7 +++-- .../worldedit/commands/ChunkCommands.java | 6 ++-- .../worldedit/commands/ClipboardCommands.java | 16 +++++----- .../worldedit/commands/CommandsManager.java | 27 ++++++++++++++-- .../worldedit/commands/GeneralCommands.java | 4 +-- .../commands/GenerationCommands.java | 14 ++++----- .../worldedit/commands/HistoryCommands.java | 6 ++-- .../commands/NavigationCommands.java | 14 ++++----- .../worldedit/commands/RegionCommands.java | 16 +++++----- .../worldedit/commands/ScriptingCommands.java | 4 +-- .../worldedit/commands/SelectionCommands.java | 24 +++++++------- .../worldedit/commands/SnapshotCommands.java | 6 ++-- .../commands/SuperPickaxeCommands.java | 24 +++++++------- .../worldedit/commands/UtilityCommands.java | 26 ++++++++-------- 16 files changed, 140 insertions(+), 86 deletions(-) diff --git a/src/com/sk89q/util/commands/Command.java b/src/com/sk89q/util/commands/Command.java index 175e5cda1..e52bfbed2 100644 --- a/src/com/sk89q/util/commands/Command.java +++ b/src/com/sk89q/util/commands/Command.java @@ -28,4 +28,5 @@ public @interface Command { String desc(); int min(); int max(); + String flags() default ""; } diff --git a/src/com/sk89q/util/commands/CommandContext.java b/src/com/sk89q/util/commands/CommandContext.java index 2fa930aa4..add522149 100644 --- a/src/com/sk89q/util/commands/CommandContext.java +++ b/src/com/sk89q/util/commands/CommandContext.java @@ -18,14 +18,35 @@ package com.sk89q.util.commands; +import java.util.HashSet; +import java.util.Set; + public class CommandContext { protected String[] args; + protected Set flags = new HashSet(); public CommandContext(String args) { - this.args = args.split(" "); + this(args.split(" ")); } public CommandContext(String[] args) { + int i = 1; + + for (; i < args.length; i++) { + if (args[i].charAt(0) == '-') { + for (int k = 1; k < args[i].length(); k++) { + flags.add(args[i].charAt(k)); + } + } else { + break; + } + } + + String[] newArgs = new String[args.length - i + 1]; + + System.arraycopy(args, i, newArgs, 1, args.length - i); + newArgs[0] = args[0]; + this.args = args; } @@ -70,6 +91,14 @@ public class CommandContext { return slice; } + public boolean hasFlag(char ch) { + return flags.contains(ch); + } + + public Set getFlags() { + return flags; + } + public int length() { return args.length; } diff --git a/src/com/sk89q/worldedit/WorldEdit.java b/src/com/sk89q/worldedit/WorldEdit.java index 3809d69a3..0bb558b9f 100644 --- a/src/com/sk89q/worldedit/WorldEdit.java +++ b/src/com/sk89q/worldedit/WorldEdit.java @@ -678,12 +678,13 @@ public class WorldEdit { */ public boolean handleCommand(LocalPlayer player, String[] split) { try { + split[0] = split[0].substring(1); // Quick script shortcut - if (split[0].matches("^/[^/].*\\.js$")) { + if (split[0].matches("^[^/].*\\.js$")) { String[] newSplit = new String[split.length + 1]; System.arraycopy(split, 0, newSplit, 1, split.length); - newSplit[0] = "/cs"; + newSplit[0] = "cs"; newSplit[1] = newSplit[1].substring(1); split = newSplit; } @@ -691,7 +692,7 @@ public class WorldEdit { String searchCmd = split[0].toLowerCase(); if (commands.hasCommand(searchCmd) || (config.noDoubleSlash && commands.hasCommand("/" + searchCmd)) - || ((searchCmd.length() < 3 || searchCmd.charAt(2) != '/') + || (searchCmd.length() >= 2 && searchCmd.charAt(0) == '/' && commands.hasCommand(searchCmd.substring(1)))) { if (config.noDoubleSlash && commands.hasCommand("/" + searchCmd)) { split[0] = "/" + split[0]; diff --git a/src/com/sk89q/worldedit/commands/ChunkCommands.java b/src/com/sk89q/worldedit/commands/ChunkCommands.java index cd5222636..c2b6de77e 100644 --- a/src/com/sk89q/worldedit/commands/ChunkCommands.java +++ b/src/com/sk89q/worldedit/commands/ChunkCommands.java @@ -33,7 +33,7 @@ import com.sk89q.worldedit.data.NestedFileChunkStore; */ public class ChunkCommands { @Command( - aliases = {"/chunkinfo"}, + aliases = {"chunkinfo"}, usage = "", desc = "Get information about the chunk that you are inside", min = 0, @@ -58,7 +58,7 @@ public class ChunkCommands { } @Command( - aliases = {"/listchunks"}, + aliases = {"listchunks"}, usage = "", desc = "List chunks that your selection includes", min = 0, @@ -77,7 +77,7 @@ public class ChunkCommands { } @Command( - aliases = {"/delchunks"}, + aliases = {"delchunks"}, usage = "", desc = "Delete chunks that your selection includes", min = 0, diff --git a/src/com/sk89q/worldedit/commands/ClipboardCommands.java b/src/com/sk89q/worldedit/commands/ClipboardCommands.java index 21efd19a1..5b3e663ba 100644 --- a/src/com/sk89q/worldedit/commands/ClipboardCommands.java +++ b/src/com/sk89q/worldedit/commands/ClipboardCommands.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.regions.Region; */ public class ClipboardCommands { @Command( - aliases = {"//copy"}, + aliases = {"/copy"}, usage = "", desc = "Copy the selection to the clipboard", min = 0, @@ -61,7 +61,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//cut"}, + aliases = {"/cut"}, usage = "[leave-id]", desc = "Cut the selection to the clipboard", min = 0, @@ -94,7 +94,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//paste"}, + aliases = {"/paste"}, usage = "[at-origin?]", desc = "Paste the clipboard's contents", min = 0, @@ -124,7 +124,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//rotate"}, + aliases = {"/rotate"}, usage = "", desc = "Rotate the contents of the clipboard", min = 1, @@ -147,7 +147,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//flip"}, + aliases = {"/flip"}, usage = "[dir]", desc = "Flip the contents of the clipboard", min = 0, @@ -167,7 +167,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//load"}, + aliases = {"/load"}, usage = "", desc = "Load a schematic into your clipboard", min = 1, @@ -209,7 +209,7 @@ public class ClipboardCommands { } @Command( - aliases = {"//save"}, + aliases = {"/save"}, usage = "", desc = "Save a schematic into your clipboard", min = 1, @@ -265,7 +265,7 @@ public class ClipboardCommands { } @Command( - aliases = {"/clearclipboard"}, + aliases = {"clearclipboard"}, usage = "", desc = "Clear your clipboard", min = 0, diff --git a/src/com/sk89q/worldedit/commands/CommandsManager.java b/src/com/sk89q/worldedit/commands/CommandsManager.java index 8711701a2..d24ac9f3d 100644 --- a/src/com/sk89q/worldedit/commands/CommandsManager.java +++ b/src/com/sk89q/worldedit/commands/CommandsManager.java @@ -95,6 +95,19 @@ public class CommandsManager { return descs; } + /** + * Get the usage string for a command. + * + * @param command + * @param cmd + * @return + */ + private String getUsage(String command, Command cmd) { + return command + + (cmd.flags().length() > 0 ? " [-" + cmd.flags() + "]" : " ") + + cmd.usage(); + } + /** * Attempt to execute a command. * @@ -121,15 +134,25 @@ public class CommandsManager { Command cmd = method.getAnnotation(Command.class); if (args.argsLength() < cmd.min()) { - player.printError(args.getCommand() + " " + cmd.usage()); + player.printError("Too few arguments."); + player.printError(getUsage(args.getCommand(), cmd)); return true; } if (cmd.max() != -1 && args.argsLength() > cmd.max()) { - player.printError(args.getCommand() + " " + cmd.usage()); + player.printError("Too many arguments."); + player.printError(getUsage(args.getCommand(), cmd)); return true; } + for (char flag : args.getFlags()) { + if (cmd.flags().indexOf(String.valueOf(flag)) == -1) { + player.printError("Unknown flag: " + flag); + player.printError(getUsage(args.getCommand(), cmd)); + return true; + } + } + try { method.invoke(null, args, we, session, player, editSession); } catch (IllegalArgumentException e) { diff --git a/src/com/sk89q/worldedit/commands/GeneralCommands.java b/src/com/sk89q/worldedit/commands/GeneralCommands.java index 34e604a5a..f80361920 100644 --- a/src/com/sk89q/worldedit/commands/GeneralCommands.java +++ b/src/com/sk89q/worldedit/commands/GeneralCommands.java @@ -30,7 +30,7 @@ import com.sk89q.worldedit.*; */ public class GeneralCommands { @Command( - aliases = {"//limit"}, + aliases = {"/limit"}, usage = "", desc = "Modify block change limit", min = 1, @@ -58,7 +58,7 @@ public class GeneralCommands { } @Command( - aliases = {"/toggleplace"}, + aliases = {"toggleplace"}, usage = "", desc = "", min = 0, diff --git a/src/com/sk89q/worldedit/commands/GenerationCommands.java b/src/com/sk89q/worldedit/commands/GenerationCommands.java index 0b5610333..11e9698dd 100644 --- a/src/com/sk89q/worldedit/commands/GenerationCommands.java +++ b/src/com/sk89q/worldedit/commands/GenerationCommands.java @@ -31,7 +31,7 @@ import com.sk89q.worldedit.blocks.BaseBlock; */ public class GenerationCommands { @Command( - aliases = {"//hcyl"}, + aliases = {"/hcyl"}, usage = " [height] ", desc = "Generate a hollow cylinder", min = 2, @@ -52,7 +52,7 @@ public class GenerationCommands { } @Command( - aliases = {"//cyl"}, + aliases = {"/cyl"}, usage = " [height] ", desc = "Generate a cylinder", min = 2, @@ -73,7 +73,7 @@ public class GenerationCommands { } @Command( - aliases = {"//hsphere"}, + aliases = {"/hsphere"}, usage = " [raised?] ", desc = "Generate a hollow sphere", min = 2, @@ -102,7 +102,7 @@ public class GenerationCommands { } @Command( - aliases = {"//sphere"}, + aliases = {"/sphere"}, usage = " [raised?] ", desc = "Generate a filled sphere", min = 2, @@ -131,7 +131,7 @@ public class GenerationCommands { } @Command( - aliases = {"/forestgen"}, + aliases = {"forestgen"}, usage = "[size] [density] ", desc = "Generate a forest", min = 0, @@ -151,7 +151,7 @@ public class GenerationCommands { } @Command( - aliases = {"/pinegen"}, + aliases = {"pinegen"}, usage = "[size] [density]", desc = "Generate a pine forest", min = 0, @@ -171,7 +171,7 @@ public class GenerationCommands { } @Command( - aliases = {"/pumpkins"}, + aliases = {"pumpkins"}, usage = "[size]", desc = "Generate pumpkin patches", min = 0, diff --git a/src/com/sk89q/worldedit/commands/HistoryCommands.java b/src/com/sk89q/worldedit/commands/HistoryCommands.java index 5db794827..bd0f8e553 100644 --- a/src/com/sk89q/worldedit/commands/HistoryCommands.java +++ b/src/com/sk89q/worldedit/commands/HistoryCommands.java @@ -30,7 +30,7 @@ import com.sk89q.worldedit.*; */ public class HistoryCommands { @Command( - aliases = {"//undo"}, + aliases = {"/undo"}, usage = "", desc = "Undoes the last action", min = 0, @@ -51,7 +51,7 @@ public class HistoryCommands { } @Command( - aliases = {"//redo"}, + aliases = {"/redo"}, usage = "", desc = "Redoes the last action (from history)", min = 0, @@ -72,7 +72,7 @@ public class HistoryCommands { } @Command( - aliases = {"/clearhistory"}, + aliases = {"clearhistory"}, usage = "", desc = "Clear your history", min = 0, diff --git a/src/com/sk89q/worldedit/commands/NavigationCommands.java b/src/com/sk89q/worldedit/commands/NavigationCommands.java index 545dd6c32..0920c7333 100644 --- a/src/com/sk89q/worldedit/commands/NavigationCommands.java +++ b/src/com/sk89q/worldedit/commands/NavigationCommands.java @@ -30,7 +30,7 @@ import com.sk89q.worldedit.*; */ public class NavigationCommands { @Command( - aliases = {"/unstuck"}, + aliases = {"unstuck"}, usage = "", desc = "Escape from being stuck inside a block", min = 0, @@ -46,7 +46,7 @@ public class NavigationCommands { } @Command( - aliases = {"/ascend"}, + aliases = {"ascend"}, usage = "", desc = "Go up a floor", min = 0, @@ -65,7 +65,7 @@ public class NavigationCommands { } @Command( - aliases = {"/descend"}, + aliases = {"descend"}, usage = "", desc = "Go down a floor", min = 0, @@ -84,7 +84,7 @@ public class NavigationCommands { } @Command( - aliases = {"/ceil"}, + aliases = {"ceil"}, usage = "[clearance]", desc = "Go to the celing", min = 0, @@ -106,7 +106,7 @@ public class NavigationCommands { } @Command( - aliases = {"/thru"}, + aliases = {"thru"}, usage = "", desc = "Passthrough walls", min = 0, @@ -125,7 +125,7 @@ public class NavigationCommands { } @Command( - aliases = {"/jumpto"}, + aliases = {"jumpto"}, usage = "", desc = "Teleport to a location", min = 0, @@ -146,7 +146,7 @@ public class NavigationCommands { } @Command( - aliases = {"/up"}, + aliases = {"up"}, usage = "", desc = "Go upwards some distance", min = 1, diff --git a/src/com/sk89q/worldedit/commands/RegionCommands.java b/src/com/sk89q/worldedit/commands/RegionCommands.java index 4fa5a26a6..074472a96 100644 --- a/src/com/sk89q/worldedit/commands/RegionCommands.java +++ b/src/com/sk89q/worldedit/commands/RegionCommands.java @@ -36,7 +36,7 @@ import com.sk89q.worldedit.regions.Region; */ public class RegionCommands { @Command( - aliases = {"//set"}, + aliases = {"/set"}, usage = "", desc = "Set all the blocks inside the selection to a block", min = 1, @@ -62,7 +62,7 @@ public class RegionCommands { } @Command( - aliases = {"//replace"}, + aliases = {"/replace"}, usage = "[from-block] ", desc = "Replace all blocks in the selection with another", min = 1, @@ -95,7 +95,7 @@ public class RegionCommands { } @Command( - aliases = {"//overlay"}, + aliases = {"/overlay"}, usage = "", desc = "Set a block on top of blocks in the region", min = 1, @@ -114,7 +114,7 @@ public class RegionCommands { } @Command( - aliases = {"//walls"}, + aliases = {"/walls"}, usage = "", desc = "Build the four sides of the selection", min = 1, @@ -132,7 +132,7 @@ public class RegionCommands { } @Command( - aliases = {"//faces", "//outline"}, + aliases = {"/faces", "/outline"}, usage = "", desc = "Build the walls, ceiling, and roof of a selection", min = 1, @@ -149,7 +149,7 @@ public class RegionCommands { } @Command( - aliases = {"//smooth"}, + aliases = {"/smooth"}, usage = "[iterations]", desc = "Smooth the elevation in the selection", min = 0, @@ -173,7 +173,7 @@ public class RegionCommands { } @Command( - aliases = {"//move"}, + aliases = {"/move"}, usage = "[count] [direction] [leave-id] ", desc = "Move the contents of the selection", min = 0, @@ -203,7 +203,7 @@ public class RegionCommands { @Command( - aliases = {"//stack"}, + aliases = {"/stack"}, usage = "[count] [direction] ", desc = "Repeat the contents of the selection", min = 0, diff --git a/src/com/sk89q/worldedit/commands/ScriptingCommands.java b/src/com/sk89q/worldedit/commands/ScriptingCommands.java index b6cfa3420..fbc4a7ae5 100644 --- a/src/com/sk89q/worldedit/commands/ScriptingCommands.java +++ b/src/com/sk89q/worldedit/commands/ScriptingCommands.java @@ -30,7 +30,7 @@ import com.sk89q.worldedit.*; */ public class ScriptingCommands { @Command( - aliases = {"/cs"}, + aliases = {"cs"}, usage = " [args...]", desc = "Execute a CraftScript", min = 1, @@ -50,7 +50,7 @@ public class ScriptingCommands { } @Command( - aliases = {"/.s"}, + aliases = {".s"}, usage = "[args...]", desc = "Execute last CraftScript", min = 0, diff --git a/src/com/sk89q/worldedit/commands/SelectionCommands.java b/src/com/sk89q/worldedit/commands/SelectionCommands.java index 476274cc4..997d6c3b0 100644 --- a/src/com/sk89q/worldedit/commands/SelectionCommands.java +++ b/src/com/sk89q/worldedit/commands/SelectionCommands.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.blocks.*; */ public class SelectionCommands { @Command( - aliases = {"//pos1"}, + aliases = {"/pos1"}, usage = "", desc = "Set position 1", min = 0, @@ -57,7 +57,7 @@ public class SelectionCommands { } @Command( - aliases = {"//pos2"}, + aliases = {"/pos2"}, usage = "", desc = "Set position 2", min = 0, @@ -79,7 +79,7 @@ public class SelectionCommands { } @Command( - aliases = {"//hpos1"}, + aliases = {"/hpos1"}, usage = "", desc = "Set position 1 to targeted block", min = 0, @@ -106,7 +106,7 @@ public class SelectionCommands { } @Command( - aliases = {"//hpos2"}, + aliases = {"/hpos2"}, usage = "", desc = "Set position 2 to targeted block", min = 0, @@ -134,7 +134,7 @@ public class SelectionCommands { } @Command( - aliases = {"//chunk"}, + aliases = {"/chunk"}, usage = "", desc = "Set the selection to your current chunk", min = 0, @@ -157,7 +157,7 @@ public class SelectionCommands { } @Command( - aliases = {"//wand"}, + aliases = {"/wand"}, usage = "", desc = "Get the wand object", min = 0, @@ -173,7 +173,7 @@ public class SelectionCommands { } @Command( - aliases = {"/toggleeditwand"}, + aliases = {"toggleeditwand"}, usage = "", desc = "Toggle functionality of the edit wand", min = 0, @@ -194,7 +194,7 @@ public class SelectionCommands { } @Command( - aliases = {"//expand"}, + aliases = {"/expand"}, usage = " [reverse-amount] ", desc = "Expand the selection area", min = 1, @@ -259,7 +259,7 @@ public class SelectionCommands { } @Command( - aliases = {"//contract"}, + aliases = {"/contract"}, usage = " [reverse-amount] [direction]", desc = "Contract the selection area", min = 1, @@ -305,7 +305,7 @@ public class SelectionCommands { } @Command( - aliases = {"//shift"}, + aliases = {"/shift"}, usage = " [direction]", desc = "Shift the selection area", min = 1, @@ -334,7 +334,7 @@ public class SelectionCommands { } @Command( - aliases = {"//size"}, + aliases = {"/size"}, usage = "", desc = "Get information about the selection", min = 0, @@ -375,7 +375,7 @@ public class SelectionCommands { } @Command( - aliases = {"//distr"}, + aliases = {"/distr"}, usage = "", desc = "Get the distribution of blocks in the selection", min = 0, diff --git a/src/com/sk89q/worldedit/commands/SnapshotCommands.java b/src/com/sk89q/worldedit/commands/SnapshotCommands.java index 64be69528..044a44bb0 100644 --- a/src/com/sk89q/worldedit/commands/SnapshotCommands.java +++ b/src/com/sk89q/worldedit/commands/SnapshotCommands.java @@ -37,7 +37,7 @@ import com.sk89q.worldedit.snapshots.SnapshotRestore; */ public class SnapshotCommands { @Command( - aliases = {"/listsnapshots"}, + aliases = {"listsnapshots"}, usage = "[num]", desc = "List snapshots", min = 0, @@ -71,7 +71,7 @@ public class SnapshotCommands { } @Command( - aliases = {"//use"}, + aliases = {"/use"}, usage = "", desc = "Choose a snapshot to use", min = 1, @@ -112,7 +112,7 @@ public class SnapshotCommands { } @Command( - aliases = {"//restore"}, + aliases = {"/restore"}, usage = "[snapshot]", desc = "Restore the selection from a snapshot", min = 0, diff --git a/src/com/sk89q/worldedit/commands/SuperPickaxeCommands.java b/src/com/sk89q/worldedit/commands/SuperPickaxeCommands.java index 73572b717..562324557 100644 --- a/src/com/sk89q/worldedit/commands/SuperPickaxeCommands.java +++ b/src/com/sk89q/worldedit/commands/SuperPickaxeCommands.java @@ -32,7 +32,7 @@ import com.sk89q.worldedit.superpickaxe.*; */ public class SuperPickaxeCommands { @Command( - aliases = {"//", "/,"}, + aliases = {"/", ","}, usage = "", desc = "Toggle the super pickaxe pickaxe function", min = 0, @@ -51,7 +51,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/single"}, + aliases = {"single"}, usage = "", desc = "Enable the single block super pickaxe mode", min = 0, @@ -68,7 +68,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/area"}, + aliases = {"area"}, usage = "", desc = "Enable the area super pickaxe pickaxe mode", min = 1, @@ -93,7 +93,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/recur"}, + aliases = {"recur"}, usage = "", desc = "Enable the recursive super pickaxe pickaxe mode", min = 1, @@ -118,7 +118,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/none"}, + aliases = {"none"}, usage = "", desc = "Turn off all superpickaxe alternate modes", min = 0, @@ -134,7 +134,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/info"}, + aliases = {"info"}, usage = "", desc = "Block information tool", min = 0, @@ -151,7 +151,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/tree"}, + aliases = {"tree"}, usage = "", desc = "Tree generator tool", min = 0, @@ -168,7 +168,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/bigtree"}, + aliases = {"bigtree"}, usage = "", desc = "Big tree generator tool", min = 0, @@ -185,7 +185,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/pinetree"}, + aliases = {"pinetree"}, usage = "", desc = "Pine tree generator tool", min = 0, @@ -202,7 +202,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/repl"}, + aliases = {"repl"}, usage = "", desc = "Block replacer tool", min = 1, @@ -220,7 +220,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/brush"}, + aliases = {"brush"}, usage = " [radius] [no-replace?]", desc = "Build spheres from far away", min = 1, @@ -253,7 +253,7 @@ public class SuperPickaxeCommands { } @Command( - aliases = {"/rbrush"}, + aliases = {"rbrush"}, usage = " [radius] ", desc = "Brush tool that will only replace blocks", min = 1, diff --git a/src/com/sk89q/worldedit/commands/UtilityCommands.java b/src/com/sk89q/worldedit/commands/UtilityCommands.java index f25f6338c..02637c583 100644 --- a/src/com/sk89q/worldedit/commands/UtilityCommands.java +++ b/src/com/sk89q/worldedit/commands/UtilityCommands.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.regions.Region; */ public class UtilityCommands { @Command( - aliases = {"//fill"}, + aliases = {"/fill"}, usage = " [depth] ", desc = "Fill a hole", min = 2, @@ -64,7 +64,7 @@ public class UtilityCommands { } @Command( - aliases = {"//fillr"}, + aliases = {"/fillr"}, usage = " [depth] ", desc = "Fill a hole recursively", min = 2, @@ -93,7 +93,7 @@ public class UtilityCommands { } @Command( - aliases = {"//drain"}, + aliases = {"/drain"}, usage = "", desc = "Drain a pool", min = 1, @@ -112,7 +112,7 @@ public class UtilityCommands { } @Command( - aliases = {"/fixlava"}, + aliases = {"fixlava"}, usage = "", desc = "Fix lava to be stationary", min = 1, @@ -131,7 +131,7 @@ public class UtilityCommands { } @Command( - aliases = {"/fixwater"}, + aliases = {"fixwater"}, usage = "", desc = "Fix water to be stationary", min = 1, @@ -150,7 +150,7 @@ public class UtilityCommands { } @Command( - aliases = {"/removeabove"}, + aliases = {"removeabove"}, usage = "[size] [height] ", desc = "Remove blocks above your head. ", min = 0, @@ -171,7 +171,7 @@ public class UtilityCommands { } @Command( - aliases = {"/removebelow"}, + aliases = {"removebelow"}, usage = "[size] [height] ", desc = "Remove blocks below your head. ", min = 0, @@ -192,7 +192,7 @@ public class UtilityCommands { } @Command( - aliases = {"/removenear"}, + aliases = {"removenear"}, usage = " [size] ", desc = "Remove blocks near you.", min = 1, @@ -213,7 +213,7 @@ public class UtilityCommands { } @Command( - aliases = {"/replacenear"}, + aliases = {"replacenear"}, usage = " ", desc = "Replace nearby blocks", min = 3, @@ -244,7 +244,7 @@ public class UtilityCommands { } @Command( - aliases = {"/snow"}, + aliases = {"snow"}, usage = "[radius]", desc = "Simulates snow", min = 0, @@ -262,7 +262,7 @@ public class UtilityCommands { } @Command( - aliases = {"/thaw"}, + aliases = {"thaw"}, usage = "[radius]", desc = "Thaws the area", min = 0, @@ -280,7 +280,7 @@ public class UtilityCommands { } @Command( - aliases = {"/ex", "/ext", "/extinguish"}, + aliases = {"ex", "ext", "extinguish"}, usage = "[radius]", desc = "Extinguish nearby fire", min = 0, @@ -304,7 +304,7 @@ public class UtilityCommands { } @Command( - aliases = {"/butcher"}, + aliases = {"butcher"}, usage = "[radius]", desc = "Kill all or nearby mobs", min = 0,