From 8e1d42d4c59e185e8e04a179c6d4aa2af86d1c96 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 2 Aug 2015 16:50:53 +1000 Subject: [PATCH] Fix some more typos --- .../com/intellectualcrafters/plot/commands/RegenAllRoads.java | 3 ++- .../java/com/intellectualcrafters/plot/commands/Update.java | 2 +- .../intellectualcrafters/plot/util/helpmenu/HelpObject.java | 2 +- .../java/com/plotsquared/general/commands/CommandManager.java | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java b/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java index 549e94f31..03e514ae9 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java @@ -35,9 +35,10 @@ import com.plotsquared.general.commands.Argument; import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( - command = "/plot regenallroads ", + command = "regenallroads", description = "Regenerate all roads in the map using the set road schematic", aliases = {"rgar"}, + usage = "/plot regenallroads ", category = CommandCategory.DEBUG, requiredType = RequiredType.CONSOLE, permission = "plots.regenallroads" diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Update.java b/src/main/java/com/intellectualcrafters/plot/commands/Update.java index 426211bb0..f5a9e9467 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Update.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Update.java @@ -58,7 +58,7 @@ public class Update extends SubCommand { } } else { - MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, getUsage()); + MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, getUsage().replaceAll("\\{label\\}", "plot")); return false; } if (url == null) { diff --git a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java index 22a704270..ebb8bacd4 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java +++ b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java @@ -12,7 +12,7 @@ public class HelpObject { public HelpObject(final Command command, String label) { this._command = command; - this._rendered = StringMan.replaceAll(C.HELP_ITEM.s(), "%usage%", _command.getUsage(), "[%alias%]", _command.getAliases().size() > 0 ? "(" + StringMan.join(_command.getAliases(), "|") + ")" : "","%desc%", _command.getDescription(),"%arguments%", buildArgumentList(_command.getRequiredArguments()), "{label}", label); + this._rendered = StringMan.replaceAll(C.HELP_ITEM.s(), "%usage%", _command.getUsage().replaceAll("\\{label\\}", label), "[%alias%]", _command.getAliases().size() > 0 ? "(" + StringMan.join(_command.getAliases(), "|") + ")" : "","%desc%", _command.getDescription(),"%arguments%", buildArgumentList(_command.getRequiredArguments()), "{label}", label); } @Override diff --git a/src/main/java/com/plotsquared/general/commands/CommandManager.java b/src/main/java/com/plotsquared/general/commands/CommandManager.java index eaa04361e..3b5a83c7c 100644 --- a/src/main/java/com/plotsquared/general/commands/CommandManager.java +++ b/src/main/java/com/plotsquared/general/commands/CommandManager.java @@ -119,7 +119,7 @@ public class CommandManager { } } if (!success) { - String usage = cmd.getUsage(); + String usage = cmd.getUsage().replaceAll("\\{label\\}", parts[0]); C.COMMAND_SYNTAX.send(plr, cmd.getUsage()); return CommandHandlingOutput.WRONG_USAGE; }