From 4c9e0a629fa21d4ac675a680d741ad6987d17634 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 5 Dec 2011 11:21:40 +0100 Subject: [PATCH] Added help text for most commands that take flags. //generate, //regen, //deform, //[h]cyl, //[h]sphere, //chunk, //outset, //inset, //stack, //move, //smooth, //paste, //flip, /search //distr /butcher, //brush sphere/cyl/clipboard/smooth Only //replace and /replacenear are still missing. --- .../worldedit/commands/BrushCommands.java | 12 ++++++ .../worldedit/commands/ClipboardCommands.java | 9 +++++ .../worldedit/commands/GeneralCommands.java | 5 +++ .../commands/GenerationCommands.java | 40 ++++++++++++++++--- .../worldedit/commands/RegionCommands.java | 21 ++++++++++ .../worldedit/commands/SelectionCommands.java | 17 ++++++++ .../worldedit/commands/UtilityCommands.java | 3 ++ 7 files changed, 102 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java b/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java index 4581a9e44..076041e87 100644 --- a/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/BrushCommands.java @@ -54,6 +54,9 @@ public class BrushCommands { usage = " [radius]", flags = "h", desc = "Choose the sphere brush", + help = + "Chooses the sphere brush.\n" + + "The -h flag creates hollow spheres instead.", min = 1, max = 2 ) @@ -91,6 +94,9 @@ public class BrushCommands { usage = " [radius] [height]", flags = "h", desc = "Choose the cylinder brush", + help = + "Chooses the cylinder brush.\n" + + "The -h flag creates hollow cylinders instead.", min = 1, max = 3 ) @@ -135,6 +141,9 @@ public class BrushCommands { usage = "", flags = "a", desc = "Choose the clipboard brush", + help = + "Chooses the clipboard brush.\n" + + "The -a flag makes it not paste air.", min = 0, max = 0 ) @@ -173,6 +182,9 @@ public class BrushCommands { usage = "[size] [iterations]", flags = "n", desc = "Choose the terrain softener brush", + help = + "Chooses the terrain softener brush.\n" + + "The -n flag makes it only consider naturally occuring blocks.", min = 0, max = 2 ) diff --git a/src/main/java/com/sk89q/worldedit/commands/ClipboardCommands.java b/src/main/java/com/sk89q/worldedit/commands/ClipboardCommands.java index b37875474..8c5f85812 100644 --- a/src/main/java/com/sk89q/worldedit/commands/ClipboardCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/ClipboardCommands.java @@ -103,6 +103,11 @@ public class ClipboardCommands { usage = "", flags = "ao", desc = "Paste the clipboard's contents", + help = + "Pastes the clipboard's contents.\n" + + "Flags:\n" + + " -a skips air blocks\n" + + " -o pastes at the original position", min = 0, max = 0 ) @@ -156,6 +161,10 @@ public class ClipboardCommands { usage = "[dir]", flags = "p", desc = "Flip the contents of the clipboard.", + help = + "Flips the contents of the clipboard.\n" + + "The -p flag flips the selection around the player,\n" + + "instead of the selections center.", min = 0, max = 1 ) diff --git a/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java b/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java index 03d1338a7..6b5b09013 100644 --- a/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java @@ -137,6 +137,11 @@ public class GeneralCommands { usage = "", flags = "bi", desc = "Search for an item", + help = + "Searches for an item.\n" + + "Flags:\n" + + " -b only search for blocks\n" + + " -i only search for items", min = 1, max = 1 ) diff --git a/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java b/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java index 35bc291ba..6a66d88bf 100644 --- a/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java @@ -39,7 +39,12 @@ public class GenerationCommands { @Command( aliases = { "/hcyl" }, usage = " [,] [height]", - desc = "Generate a hollow cylinder", + desc = "Generates a hollow cylinder.", + help = + "Generates a hollow cylinder.\n" + + "By specifying 2 radii, separated by a comma,\n" + + "you can generate elliptical cylinders.\n" + + "The 1st radius is north/south, the 2nd radius is east/west.", min = 2, max = 3 ) @@ -76,7 +81,12 @@ public class GenerationCommands { @Command( aliases = { "/cyl" }, usage = " [,] [height]", - desc = "Generate a cylinder", + desc = "Generates a cylinder.", + help = + "Generates a cylinder.\n" + + "By specifying 2 radii, separated by a comma,\n" + + "you can generate elliptical cylinders.\n" + + "The 1st radius is north/south, the 2nd radius is east/west.", min = 2, max = 3 ) @@ -113,7 +123,12 @@ public class GenerationCommands { @Command( aliases = { "/hsphere" }, usage = " [,,] [raised?]", - desc = "Generate a hollow sphere.", + desc = "Generates a hollow sphere.", + help = + "Generates a hollow sphere.\n" + + "By specifying 3 radii, separated by commas,\n" + + "you can generate an ellipsoid. The order of the ellipsoid radii\n" + + "is north/south, up/down, east/west.", min = 2, max = 3 ) @@ -161,7 +176,12 @@ public class GenerationCommands { @Command( aliases = { "/sphere" }, usage = " [,,] [raised?]", - desc = "Generate a filled sphere.", + desc = "Generates a filled sphere.", + help = + "Generates a filled sphere.\n" + + "By specifying 3 radii, separated by commas,\n" + + "you can generate an ellipsoid. The order of the ellipsoid radii\n" + + "is north/south, up/down, east/west.", min = 2, max = 3 ) @@ -303,7 +323,17 @@ public class GenerationCommands { @Command( aliases = { "/generate", "/gen", "/g" }, usage = " ", - desc = "Generates a shape according to a formula. -h for hollow, -r for raw coordinates, -o for unscaled, but offset from placement", + desc = "Generates a shape according to a formula.", + help = + "Generates a shape according to a formula that is expected to\n" + + "return positive numbers (true) if the point is inside the shape\n" + + "Optionally set type/data to the desired block.\n" + + "Flags:\n" + + " -h to generate a hollow shape\n" + + " -r to use raw minecraft coordinates\n" + + " -o is like -r, except offset from placement.\n" + + "If neither -r nor -o is given, the selection is mapped to -1..1\n" + + "See also tinyurl.com/wesyntax.", flags = "hro", min = 1, max = -1 diff --git a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java index 61915c97b..e6c798aba 100644 --- a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java @@ -201,6 +201,9 @@ public class RegionCommands { usage = "[iterations]", flags = "n", desc = "Smooth the elevation in the selection", + help = + "Smoothes the elevation in the selection.\n" + + "The -n flag makes it only consider naturally occuring blocks.", min = 0, max = 1 ) @@ -227,6 +230,10 @@ public class RegionCommands { usage = "[count] [direction] [leave-id]", flags = "s", desc = "Move the contents of the selection", + help = + "Move the contents of the selection.\n" + + "The -s flag shifts the selection to the target location.\n" + + "Optionally fills the old location with .", min = 0, max = 3 ) @@ -272,6 +279,11 @@ public class RegionCommands { usage = "[count] [direction]", flags = "sa", desc = "Repeat the contents of the selection", + help = + "Repeats the contents of the selection.\n" + + "Flags:\n" + + " -s shifts the selection to the last stacked copy\n" + + " -a skips air blocks", min = 0, max = 2 ) @@ -311,6 +323,10 @@ public class RegionCommands { aliases = { "/regen" }, usage = "", desc = "Regenerates the contents of the selection", + help = + "Regenerates the contents of the current selection.\n" + + "This command might affect things outside the selection,\n" + + "if they are within the same chunk.", min = 0, max = 0 ) @@ -332,6 +348,11 @@ public class RegionCommands { aliases = { "/deform" }, usage = "", desc = "Deforms a selected region with an expression", + help = + "Deforms a selected region with an expression\n" + + "The expression is executed for each block and is expected\n" + + "to modify the variables x, y and z to point to a new block\n" + + "to fetch. See also tinyurl.com/wesyntax.", flags = "ro", min = 1, max = -1 diff --git a/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java b/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java index 1f6f25d65..bb5ee85e0 100644 --- a/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java @@ -171,6 +171,10 @@ public class SelectionCommands { usage = "", flags = "s", desc = "Set the selection to your current chunk.", + help = + "Set the selection to the chunk you are currently in.\n" + + "With the -s flag, your current selection is expanded\n" + + "to encompass all chunks that are part of it.", min = 0, max = 0 ) @@ -417,6 +421,11 @@ public class SelectionCommands { aliases = { "/outset" }, usage = "", desc = "Outset the selection area", + help = + "Expands the selection by the given amount in all directions.\n" + + "Flags:\n" + + " -h only expand horizontally\n" + + " -v only expand vertically\n", flags = "hv", min = 1, max = 1 @@ -456,6 +465,11 @@ public class SelectionCommands { aliases = { "/inset" }, usage = "", desc = "Inset the selection area", + help = + "Contracts the selection by the given amount in all directions.\n" + + "Flags:\n" + + " -h only contract horizontally\n" + + " -v only contract vertically\n", flags = "hv", min = 1, max = 1 @@ -537,6 +551,9 @@ public class SelectionCommands { aliases = { "/distr" }, usage = "", desc = "Get the distribution of blocks in the selection", + help = + "Gets the distribution of blocks in the selection.\n" + + "The -c flag makes it print to the console as well.", flags = "c", min = 0, max = 0 diff --git a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java index 1c22e0d8f..692c2c34a 100644 --- a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java @@ -346,6 +346,9 @@ public class UtilityCommands { usage = "[radius]", flags = "p", desc = "Kill all or nearby mobs", + help = + "Kills nearby mobs, or all mobs if you don't specify a radius.\n" + + "The -p flag makes /butcher also kill pets.", min = 0, max = 1 )