From c22acd6dd19c914575d24cea11c1276296558566 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sun, 15 Jan 2012 13:29:35 -0700 Subject: [PATCH] Fix arg range errors, add examples of WorldType. --- .../onarandombox/MultiverseCore/commands/CreateCommand.java | 3 ++- .../onarandombox/MultiverseCore/commands/ImportCommand.java | 5 +++-- .../onarandombox/MultiverseCore/commands/InfoCommand.java | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java index 4479b753..ffc3533d 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java @@ -30,7 +30,7 @@ public class CreateCommand extends MultiverseCommand { super(plugin); this.setName("Create World"); this.setCommandUsage("/mv create" + ChatColor.GREEN + " {NAME} {ENV}" + ChatColor.GOLD + " -s [SEED] -g [GENERATOR[:ID]] -t [WORLDTYPE] [-n]"); - this.setArgRange(2, 7); // SUPPRESS CHECKSTYLE: MagicNumberCheck + this.setArgRange(2, 9); // SUPPRESS CHECKSTYLE: MagicNumberCheck this.addKey("mvcreate"); this.addKey("mvc"); this.addKey("mv create"); @@ -38,6 +38,7 @@ public class CreateCommand extends MultiverseCommand { this.addCommandExample("/mv create " + ChatColor.GOLD + "world" + ChatColor.GREEN + " normal"); this.addCommandExample("/mv create " + ChatColor.GOLD + "lavaland" + ChatColor.RED + " nether"); this.addCommandExample("/mv create " + ChatColor.GOLD + "starwars" + ChatColor.AQUA + " end"); + this.addCommandExample("/mv create " + ChatColor.GOLD + "flatroom" + ChatColor.GREEN + " normal" + ChatColor.AQUA + " -t flat"); this.addCommandExample("/mv create " + ChatColor.GOLD + "gargamel" + ChatColor.GREEN + " normal" + ChatColor.DARK_AQUA + " -s gargamel"); this.addCommandExample("/mv create " + ChatColor.GOLD + "moonworld" + ChatColor.GREEN + " normal" + ChatColor.DARK_AQUA + " -g BukkitFullOfMoon"); this.worldManager = this.plugin.getMVWorldManager(); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java index a3adcdfe..bbb1edbc 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java @@ -33,12 +33,13 @@ public class ImportCommand extends MultiverseCommand { public ImportCommand(MultiverseCore plugin) { super(plugin); this.setName("Import World"); - this.setCommandUsage("/mv import" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + " -g [GENERATOR[:ID]] [-n]"); - this.setArgRange(1, 3); + this.setCommandUsage("/mv import" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + " -g [GENERATOR[:ID]] [-n] -t [TYPE]"); + this.setArgRange(2, 5); // SUPPRESS CHECKSTYLE: MagicNumberCheck this.addKey("mvimport"); this.addKey("mvim"); this.addKey("mv import"); this.addCommandExample("/mv import " + ChatColor.GOLD + "gargamel" + ChatColor.GREEN + " normal"); + this.addCommandExample("/mv import " + ChatColor.GOLD + "flatroom" + ChatColor.GREEN + " normal" + ChatColor.AQUA + " -t flat"); this.addCommandExample("/mv import " + ChatColor.GOLD + "hell_world" + ChatColor.GREEN + " nether"); this.addCommandExample("/mv import " + ChatColor.GOLD + "CleanRoom" + ChatColor.GREEN + " normal" + ChatColor.DARK_AQUA + " CleanRoomGenerator"); this.setPermission("multiverse.core.import", "Imports a new world of the specified type.", PermissionDefault.OP); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/InfoCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/InfoCommand.java index 39fb5821..dffbd882 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/InfoCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/InfoCommand.java @@ -110,6 +110,7 @@ public class InfoCommand extends MultiverseCommand { message.add(new FancyMessage("World Name: ", world.getName(), colors)); message.add(new FancyMessage("World Alias: ", world.getColoredWorldString(), colors)); message.add(new FancyMessage("Game Mode: ", world.getGameMode().toString(), colors)); + message.add(new FancyMessage("World Type: ", world.getWorldType().toString(), colors)); //message.add(new FancyMessage("Game Mode: ", StringUtils.capitalize(world.getGameMode().toString()), colors)); Location spawn = world.getSpawnLocation(); message.add(new FancyMessage("Spawn Location: ", LocationManipulation.strCoords(spawn), colors));