3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00

Added command flag support, removed / prefix from command handling process.

Dieser Commit ist enthalten in:
sk89q 2011-01-29 11:36:28 -08:00
Ursprung d1ff0250aa
Commit 059f30808d
16 geänderte Dateien mit 140 neuen und 86 gelöschten Zeilen

Datei anzeigen

@ -28,4 +28,5 @@ public @interface Command {
String desc(); String desc();
int min(); int min();
int max(); int max();
String flags() default "";
} }

Datei anzeigen

@ -18,14 +18,35 @@
package com.sk89q.util.commands; package com.sk89q.util.commands;
import java.util.HashSet;
import java.util.Set;
public class CommandContext { public class CommandContext {
protected String[] args; protected String[] args;
protected Set<Character> flags = new HashSet<Character>();
public CommandContext(String args) { public CommandContext(String args) {
this.args = args.split(" "); this(args.split(" "));
} }
public CommandContext(String[] args) { 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; this.args = args;
} }
@ -70,6 +91,14 @@ public class CommandContext {
return slice; return slice;
} }
public boolean hasFlag(char ch) {
return flags.contains(ch);
}
public Set<Character> getFlags() {
return flags;
}
public int length() { public int length() {
return args.length; return args.length;
} }

Datei anzeigen

@ -678,12 +678,13 @@ public class WorldEdit {
*/ */
public boolean handleCommand(LocalPlayer player, String[] split) { public boolean handleCommand(LocalPlayer player, String[] split) {
try { try {
split[0] = split[0].substring(1);
// Quick script shortcut // Quick script shortcut
if (split[0].matches("^/[^/].*\\.js$")) { if (split[0].matches("^[^/].*\\.js$")) {
String[] newSplit = new String[split.length + 1]; String[] newSplit = new String[split.length + 1];
System.arraycopy(split, 0, newSplit, 1, split.length); System.arraycopy(split, 0, newSplit, 1, split.length);
newSplit[0] = "/cs"; newSplit[0] = "cs";
newSplit[1] = newSplit[1].substring(1); newSplit[1] = newSplit[1].substring(1);
split = newSplit; split = newSplit;
} }
@ -691,7 +692,7 @@ public class WorldEdit {
String searchCmd = split[0].toLowerCase(); String searchCmd = split[0].toLowerCase();
if (commands.hasCommand(searchCmd) if (commands.hasCommand(searchCmd)
|| (config.noDoubleSlash && 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)))) { && commands.hasCommand(searchCmd.substring(1)))) {
if (config.noDoubleSlash && commands.hasCommand("/" + searchCmd)) { if (config.noDoubleSlash && commands.hasCommand("/" + searchCmd)) {
split[0] = "/" + split[0]; split[0] = "/" + split[0];

Datei anzeigen

@ -33,7 +33,7 @@ import com.sk89q.worldedit.data.NestedFileChunkStore;
*/ */
public class ChunkCommands { public class ChunkCommands {
@Command( @Command(
aliases = {"/chunkinfo"}, aliases = {"chunkinfo"},
usage = "", usage = "",
desc = "Get information about the chunk that you are inside", desc = "Get information about the chunk that you are inside",
min = 0, min = 0,
@ -58,7 +58,7 @@ public class ChunkCommands {
} }
@Command( @Command(
aliases = {"/listchunks"}, aliases = {"listchunks"},
usage = "", usage = "",
desc = "List chunks that your selection includes", desc = "List chunks that your selection includes",
min = 0, min = 0,
@ -77,7 +77,7 @@ public class ChunkCommands {
} }
@Command( @Command(
aliases = {"/delchunks"}, aliases = {"delchunks"},
usage = "", usage = "",
desc = "Delete chunks that your selection includes", desc = "Delete chunks that your selection includes",
min = 0, min = 0,

Datei anzeigen

@ -35,7 +35,7 @@ import com.sk89q.worldedit.regions.Region;
*/ */
public class ClipboardCommands { public class ClipboardCommands {
@Command( @Command(
aliases = {"//copy"}, aliases = {"/copy"},
usage = "", usage = "",
desc = "Copy the selection to the clipboard", desc = "Copy the selection to the clipboard",
min = 0, min = 0,
@ -61,7 +61,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//cut"}, aliases = {"/cut"},
usage = "[leave-id]", usage = "[leave-id]",
desc = "Cut the selection to the clipboard", desc = "Cut the selection to the clipboard",
min = 0, min = 0,
@ -94,7 +94,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//paste"}, aliases = {"/paste"},
usage = "[at-origin?]", usage = "[at-origin?]",
desc = "Paste the clipboard's contents", desc = "Paste the clipboard's contents",
min = 0, min = 0,
@ -124,7 +124,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//rotate"}, aliases = {"/rotate"},
usage = "<angle-in-degrees>", usage = "<angle-in-degrees>",
desc = "Rotate the contents of the clipboard", desc = "Rotate the contents of the clipboard",
min = 1, min = 1,
@ -147,7 +147,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//flip"}, aliases = {"/flip"},
usage = "[dir]", usage = "[dir]",
desc = "Flip the contents of the clipboard", desc = "Flip the contents of the clipboard",
min = 0, min = 0,
@ -167,7 +167,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//load"}, aliases = {"/load"},
usage = "<filename>", usage = "<filename>",
desc = "Load a schematic into your clipboard", desc = "Load a schematic into your clipboard",
min = 1, min = 1,
@ -209,7 +209,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"//save"}, aliases = {"/save"},
usage = "<filename>", usage = "<filename>",
desc = "Save a schematic into your clipboard", desc = "Save a schematic into your clipboard",
min = 1, min = 1,
@ -265,7 +265,7 @@ public class ClipboardCommands {
} }
@Command( @Command(
aliases = {"/clearclipboard"}, aliases = {"clearclipboard"},
usage = "", usage = "",
desc = "Clear your clipboard", desc = "Clear your clipboard",
min = 0, min = 0,

Datei anzeigen

@ -95,6 +95,19 @@ public class CommandsManager {
return descs; 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. * Attempt to execute a command.
* *
@ -121,15 +134,25 @@ public class CommandsManager {
Command cmd = method.getAnnotation(Command.class); Command cmd = method.getAnnotation(Command.class);
if (args.argsLength() < cmd.min()) { if (args.argsLength() < cmd.min()) {
player.printError(args.getCommand() + " " + cmd.usage()); player.printError("Too few arguments.");
player.printError(getUsage(args.getCommand(), cmd));
return true; return true;
} }
if (cmd.max() != -1 && args.argsLength() > cmd.max()) { 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; 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 { try {
method.invoke(null, args, we, session, player, editSession); method.invoke(null, args, we, session, player, editSession);
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {

Datei anzeigen

@ -30,7 +30,7 @@ import com.sk89q.worldedit.*;
*/ */
public class GeneralCommands { public class GeneralCommands {
@Command( @Command(
aliases = {"//limit"}, aliases = {"/limit"},
usage = "<limit>", usage = "<limit>",
desc = "Modify block change limit", desc = "Modify block change limit",
min = 1, min = 1,
@ -58,7 +58,7 @@ public class GeneralCommands {
} }
@Command( @Command(
aliases = {"/toggleplace"}, aliases = {"toggleplace"},
usage = "", usage = "",
desc = "", desc = "",
min = 0, min = 0,

Datei anzeigen

@ -31,7 +31,7 @@ import com.sk89q.worldedit.blocks.BaseBlock;
*/ */
public class GenerationCommands { public class GenerationCommands {
@Command( @Command(
aliases = {"//hcyl"}, aliases = {"/hcyl"},
usage = "<block> <radius> [height] ", usage = "<block> <radius> [height] ",
desc = "Generate a hollow cylinder", desc = "Generate a hollow cylinder",
min = 2, min = 2,
@ -52,7 +52,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"//cyl"}, aliases = {"/cyl"},
usage = "<block> <radius> [height] ", usage = "<block> <radius> [height] ",
desc = "Generate a cylinder", desc = "Generate a cylinder",
min = 2, min = 2,
@ -73,7 +73,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"//hsphere"}, aliases = {"/hsphere"},
usage = "<block> <radius> [raised?] ", usage = "<block> <radius> [raised?] ",
desc = "Generate a hollow sphere", desc = "Generate a hollow sphere",
min = 2, min = 2,
@ -102,7 +102,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"//sphere"}, aliases = {"/sphere"},
usage = "<block> <radius> [raised?] ", usage = "<block> <radius> [raised?] ",
desc = "Generate a filled sphere", desc = "Generate a filled sphere",
min = 2, min = 2,
@ -131,7 +131,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"/forestgen"}, aliases = {"forestgen"},
usage = "[size] [density] ", usage = "[size] [density] ",
desc = "Generate a forest", desc = "Generate a forest",
min = 0, min = 0,
@ -151,7 +151,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"/pinegen"}, aliases = {"pinegen"},
usage = "[size] [density]", usage = "[size] [density]",
desc = "Generate a pine forest", desc = "Generate a pine forest",
min = 0, min = 0,
@ -171,7 +171,7 @@ public class GenerationCommands {
} }
@Command( @Command(
aliases = {"/pumpkins"}, aliases = {"pumpkins"},
usage = "[size]", usage = "[size]",
desc = "Generate pumpkin patches", desc = "Generate pumpkin patches",
min = 0, min = 0,

Datei anzeigen

@ -30,7 +30,7 @@ import com.sk89q.worldedit.*;
*/ */
public class HistoryCommands { public class HistoryCommands {
@Command( @Command(
aliases = {"//undo"}, aliases = {"/undo"},
usage = "", usage = "",
desc = "Undoes the last action", desc = "Undoes the last action",
min = 0, min = 0,
@ -51,7 +51,7 @@ public class HistoryCommands {
} }
@Command( @Command(
aliases = {"//redo"}, aliases = {"/redo"},
usage = "", usage = "",
desc = "Redoes the last action (from history)", desc = "Redoes the last action (from history)",
min = 0, min = 0,
@ -72,7 +72,7 @@ public class HistoryCommands {
} }
@Command( @Command(
aliases = {"/clearhistory"}, aliases = {"clearhistory"},
usage = "", usage = "",
desc = "Clear your history", desc = "Clear your history",
min = 0, min = 0,

Datei anzeigen

@ -30,7 +30,7 @@ import com.sk89q.worldedit.*;
*/ */
public class NavigationCommands { public class NavigationCommands {
@Command( @Command(
aliases = {"/unstuck"}, aliases = {"unstuck"},
usage = "", usage = "",
desc = "Escape from being stuck inside a block", desc = "Escape from being stuck inside a block",
min = 0, min = 0,
@ -46,7 +46,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/ascend"}, aliases = {"ascend"},
usage = "", usage = "",
desc = "Go up a floor", desc = "Go up a floor",
min = 0, min = 0,
@ -65,7 +65,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/descend"}, aliases = {"descend"},
usage = "", usage = "",
desc = "Go down a floor", desc = "Go down a floor",
min = 0, min = 0,
@ -84,7 +84,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/ceil"}, aliases = {"ceil"},
usage = "[clearance]", usage = "[clearance]",
desc = "Go to the celing", desc = "Go to the celing",
min = 0, min = 0,
@ -106,7 +106,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/thru"}, aliases = {"thru"},
usage = "", usage = "",
desc = "Passthrough walls", desc = "Passthrough walls",
min = 0, min = 0,
@ -125,7 +125,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/jumpto"}, aliases = {"jumpto"},
usage = "", usage = "",
desc = "Teleport to a location", desc = "Teleport to a location",
min = 0, min = 0,
@ -146,7 +146,7 @@ public class NavigationCommands {
} }
@Command( @Command(
aliases = {"/up"}, aliases = {"up"},
usage = "<block>", usage = "<block>",
desc = "Go upwards some distance", desc = "Go upwards some distance",
min = 1, min = 1,

Datei anzeigen

@ -36,7 +36,7 @@ import com.sk89q.worldedit.regions.Region;
*/ */
public class RegionCommands { public class RegionCommands {
@Command( @Command(
aliases = {"//set"}, aliases = {"/set"},
usage = "<block>", usage = "<block>",
desc = "Set all the blocks inside the selection to a block", desc = "Set all the blocks inside the selection to a block",
min = 1, min = 1,
@ -62,7 +62,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//replace"}, aliases = {"/replace"},
usage = "[from-block] <to-block>", usage = "[from-block] <to-block>",
desc = "Replace all blocks in the selection with another", desc = "Replace all blocks in the selection with another",
min = 1, min = 1,
@ -95,7 +95,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//overlay"}, aliases = {"/overlay"},
usage = "<block>", usage = "<block>",
desc = "Set a block on top of blocks in the region", desc = "Set a block on top of blocks in the region",
min = 1, min = 1,
@ -114,7 +114,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//walls"}, aliases = {"/walls"},
usage = "<block>", usage = "<block>",
desc = "Build the four sides of the selection", desc = "Build the four sides of the selection",
min = 1, min = 1,
@ -132,7 +132,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//faces", "//outline"}, aliases = {"/faces", "/outline"},
usage = "<block>", usage = "<block>",
desc = "Build the walls, ceiling, and roof of a selection", desc = "Build the walls, ceiling, and roof of a selection",
min = 1, min = 1,
@ -149,7 +149,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//smooth"}, aliases = {"/smooth"},
usage = "[iterations]", usage = "[iterations]",
desc = "Smooth the elevation in the selection", desc = "Smooth the elevation in the selection",
min = 0, min = 0,
@ -173,7 +173,7 @@ public class RegionCommands {
} }
@Command( @Command(
aliases = {"//move"}, aliases = {"/move"},
usage = "[count] [direction] [leave-id] ", usage = "[count] [direction] [leave-id] ",
desc = "Move the contents of the selection", desc = "Move the contents of the selection",
min = 0, min = 0,
@ -203,7 +203,7 @@ public class RegionCommands {
@Command( @Command(
aliases = {"//stack"}, aliases = {"/stack"},
usage = "[count] [direction] ", usage = "[count] [direction] ",
desc = "Repeat the contents of the selection", desc = "Repeat the contents of the selection",
min = 0, min = 0,

Datei anzeigen

@ -30,7 +30,7 @@ import com.sk89q.worldedit.*;
*/ */
public class ScriptingCommands { public class ScriptingCommands {
@Command( @Command(
aliases = {"/cs"}, aliases = {"cs"},
usage = "<filename> [args...]", usage = "<filename> [args...]",
desc = "Execute a CraftScript", desc = "Execute a CraftScript",
min = 1, min = 1,
@ -50,7 +50,7 @@ public class ScriptingCommands {
} }
@Command( @Command(
aliases = {"/.s"}, aliases = {".s"},
usage = "[args...]", usage = "[args...]",
desc = "Execute last CraftScript", desc = "Execute last CraftScript",
min = 0, min = 0,

Datei anzeigen

@ -35,7 +35,7 @@ import com.sk89q.worldedit.blocks.*;
*/ */
public class SelectionCommands { public class SelectionCommands {
@Command( @Command(
aliases = {"//pos1"}, aliases = {"/pos1"},
usage = "", usage = "",
desc = "Set position 1", desc = "Set position 1",
min = 0, min = 0,
@ -57,7 +57,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//pos2"}, aliases = {"/pos2"},
usage = "", usage = "",
desc = "Set position 2", desc = "Set position 2",
min = 0, min = 0,
@ -79,7 +79,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//hpos1"}, aliases = {"/hpos1"},
usage = "", usage = "",
desc = "Set position 1 to targeted block", desc = "Set position 1 to targeted block",
min = 0, min = 0,
@ -106,7 +106,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//hpos2"}, aliases = {"/hpos2"},
usage = "", usage = "",
desc = "Set position 2 to targeted block", desc = "Set position 2 to targeted block",
min = 0, min = 0,
@ -134,7 +134,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//chunk"}, aliases = {"/chunk"},
usage = "", usage = "",
desc = "Set the selection to your current chunk", desc = "Set the selection to your current chunk",
min = 0, min = 0,
@ -157,7 +157,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//wand"}, aliases = {"/wand"},
usage = "", usage = "",
desc = "Get the wand object", desc = "Get the wand object",
min = 0, min = 0,
@ -173,7 +173,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"/toggleeditwand"}, aliases = {"toggleeditwand"},
usage = "", usage = "",
desc = "Toggle functionality of the edit wand", desc = "Toggle functionality of the edit wand",
min = 0, min = 0,
@ -194,7 +194,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//expand"}, aliases = {"/expand"},
usage = "<amount> [reverse-amount] <direction>", usage = "<amount> [reverse-amount] <direction>",
desc = "Expand the selection area", desc = "Expand the selection area",
min = 1, min = 1,
@ -259,7 +259,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//contract"}, aliases = {"/contract"},
usage = "<amount> [reverse-amount] [direction]", usage = "<amount> [reverse-amount] [direction]",
desc = "Contract the selection area", desc = "Contract the selection area",
min = 1, min = 1,
@ -305,7 +305,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//shift"}, aliases = {"/shift"},
usage = "<amount> [direction]", usage = "<amount> [direction]",
desc = "Shift the selection area", desc = "Shift the selection area",
min = 1, min = 1,
@ -334,7 +334,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//size"}, aliases = {"/size"},
usage = "", usage = "",
desc = "Get information about the selection", desc = "Get information about the selection",
min = 0, min = 0,
@ -375,7 +375,7 @@ public class SelectionCommands {
} }
@Command( @Command(
aliases = {"//distr"}, aliases = {"/distr"},
usage = "", usage = "",
desc = "Get the distribution of blocks in the selection", desc = "Get the distribution of blocks in the selection",
min = 0, min = 0,

Datei anzeigen

@ -37,7 +37,7 @@ import com.sk89q.worldedit.snapshots.SnapshotRestore;
*/ */
public class SnapshotCommands { public class SnapshotCommands {
@Command( @Command(
aliases = {"/listsnapshots"}, aliases = {"listsnapshots"},
usage = "[num]", usage = "[num]",
desc = "List snapshots", desc = "List snapshots",
min = 0, min = 0,
@ -71,7 +71,7 @@ public class SnapshotCommands {
} }
@Command( @Command(
aliases = {"//use"}, aliases = {"/use"},
usage = "<snapshot>", usage = "<snapshot>",
desc = "Choose a snapshot to use", desc = "Choose a snapshot to use",
min = 1, min = 1,
@ -112,7 +112,7 @@ public class SnapshotCommands {
} }
@Command( @Command(
aliases = {"//restore"}, aliases = {"/restore"},
usage = "[snapshot]", usage = "[snapshot]",
desc = "Restore the selection from a snapshot", desc = "Restore the selection from a snapshot",
min = 0, min = 0,

Datei anzeigen

@ -32,7 +32,7 @@ import com.sk89q.worldedit.superpickaxe.*;
*/ */
public class SuperPickaxeCommands { public class SuperPickaxeCommands {
@Command( @Command(
aliases = {"//", "/,"}, aliases = {"/", ","},
usage = "", usage = "",
desc = "Toggle the super pickaxe pickaxe function", desc = "Toggle the super pickaxe pickaxe function",
min = 0, min = 0,
@ -51,7 +51,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/single"}, aliases = {"single"},
usage = "", usage = "",
desc = "Enable the single block super pickaxe mode", desc = "Enable the single block super pickaxe mode",
min = 0, min = 0,
@ -68,7 +68,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/area"}, aliases = {"area"},
usage = "<radius>", usage = "<radius>",
desc = "Enable the area super pickaxe pickaxe mode", desc = "Enable the area super pickaxe pickaxe mode",
min = 1, min = 1,
@ -93,7 +93,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/recur"}, aliases = {"recur"},
usage = "<radius>", usage = "<radius>",
desc = "Enable the recursive super pickaxe pickaxe mode", desc = "Enable the recursive super pickaxe pickaxe mode",
min = 1, min = 1,
@ -118,7 +118,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/none"}, aliases = {"none"},
usage = "", usage = "",
desc = "Turn off all superpickaxe alternate modes", desc = "Turn off all superpickaxe alternate modes",
min = 0, min = 0,
@ -134,7 +134,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/info"}, aliases = {"info"},
usage = "", usage = "",
desc = "Block information tool", desc = "Block information tool",
min = 0, min = 0,
@ -151,7 +151,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/tree"}, aliases = {"tree"},
usage = "", usage = "",
desc = "Tree generator tool", desc = "Tree generator tool",
min = 0, min = 0,
@ -168,7 +168,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/bigtree"}, aliases = {"bigtree"},
usage = "", usage = "",
desc = "Big tree generator tool", desc = "Big tree generator tool",
min = 0, min = 0,
@ -185,7 +185,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/pinetree"}, aliases = {"pinetree"},
usage = "", usage = "",
desc = "Pine tree generator tool", desc = "Pine tree generator tool",
min = 0, min = 0,
@ -202,7 +202,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/repl"}, aliases = {"repl"},
usage = "<block>", usage = "<block>",
desc = "Block replacer tool", desc = "Block replacer tool",
min = 1, min = 1,
@ -220,7 +220,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/brush"}, aliases = {"brush"},
usage = "<block> [radius] [no-replace?]", usage = "<block> [radius] [no-replace?]",
desc = "Build spheres from far away", desc = "Build spheres from far away",
min = 1, min = 1,
@ -253,7 +253,7 @@ public class SuperPickaxeCommands {
} }
@Command( @Command(
aliases = {"/rbrush"}, aliases = {"rbrush"},
usage = "<block> [radius] ", usage = "<block> [radius] ",
desc = "Brush tool that will only replace blocks", desc = "Brush tool that will only replace blocks",
min = 1, min = 1,

Datei anzeigen

@ -35,7 +35,7 @@ import com.sk89q.worldedit.regions.Region;
*/ */
public class UtilityCommands { public class UtilityCommands {
@Command( @Command(
aliases = {"//fill"}, aliases = {"/fill"},
usage = " <block> <radius> [depth] ", usage = " <block> <radius> [depth] ",
desc = "Fill a hole", desc = "Fill a hole",
min = 2, min = 2,
@ -64,7 +64,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"//fillr"}, aliases = {"/fillr"},
usage = " <block> <radius> [depth] ", usage = " <block> <radius> [depth] ",
desc = "Fill a hole recursively", desc = "Fill a hole recursively",
min = 2, min = 2,
@ -93,7 +93,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"//drain"}, aliases = {"/drain"},
usage = "<radius>", usage = "<radius>",
desc = "Drain a pool", desc = "Drain a pool",
min = 1, min = 1,
@ -112,7 +112,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/fixlava"}, aliases = {"fixlava"},
usage = "<radius>", usage = "<radius>",
desc = "Fix lava to be stationary", desc = "Fix lava to be stationary",
min = 1, min = 1,
@ -131,7 +131,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/fixwater"}, aliases = {"fixwater"},
usage = "<radius>", usage = "<radius>",
desc = "Fix water to be stationary", desc = "Fix water to be stationary",
min = 1, min = 1,
@ -150,7 +150,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/removeabove"}, aliases = {"removeabove"},
usage = "[size] [height] ", usage = "[size] [height] ",
desc = "Remove blocks above your head. ", desc = "Remove blocks above your head. ",
min = 0, min = 0,
@ -171,7 +171,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/removebelow"}, aliases = {"removebelow"},
usage = "[size] [height] ", usage = "[size] [height] ",
desc = "Remove blocks below your head. ", desc = "Remove blocks below your head. ",
min = 0, min = 0,
@ -192,7 +192,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/removenear"}, aliases = {"removenear"},
usage = "<block> [size] ", usage = "<block> [size] ",
desc = "Remove blocks near you.", desc = "Remove blocks near you.",
min = 1, min = 1,
@ -213,7 +213,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/replacenear"}, aliases = {"replacenear"},
usage = "<size> <from-id> <to-id> ", usage = "<size> <from-id> <to-id> ",
desc = "Replace nearby blocks", desc = "Replace nearby blocks",
min = 3, min = 3,
@ -244,7 +244,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/snow"}, aliases = {"snow"},
usage = "[radius]", usage = "[radius]",
desc = "Simulates snow", desc = "Simulates snow",
min = 0, min = 0,
@ -262,7 +262,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/thaw"}, aliases = {"thaw"},
usage = "[radius]", usage = "[radius]",
desc = "Thaws the area", desc = "Thaws the area",
min = 0, min = 0,
@ -280,7 +280,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/ex", "/ext", "/extinguish"}, aliases = {"ex", "ext", "extinguish"},
usage = "[radius]", usage = "[radius]",
desc = "Extinguish nearby fire", desc = "Extinguish nearby fire",
min = 0, min = 0,
@ -304,7 +304,7 @@ public class UtilityCommands {
} }
@Command( @Command(
aliases = {"/butcher"}, aliases = {"butcher"},
usage = "[radius]", usage = "[radius]",
desc = "Kill all or nearby mobs", desc = "Kill all or nearby mobs",
min = 0, min = 0,