From e8a72d19e17d47ee9029181ccf9982a448834f39 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sun, 29 Jan 2012 15:56:57 -0700 Subject: [PATCH] Fix checkstyle violations --- .../MultiverseCore/commands/CreateCommand.java | 3 ++- .../MultiverseCore/commands/ImportCommand.java | 8 ++++---- .../MultiverseCore/enums/AllowedPortalType.java | 2 +- .../MultiverseCore/listeners/MVPortalListener.java | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java index ee44febd..d820626b 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java @@ -29,7 +29,8 @@ public class CreateCommand extends MultiverseCommand { public CreateCommand(MultiverseCore plugin) { super(plugin); this.setName("Create World"); - this.setCommandUsage("/mv create" + ChatColor.GREEN + " {NAME} {ENV}" + ChatColor.GOLD + " -s [SEED] -g [GENERATOR[:ID]] -t [WORLDTYPE] [-n] -a [true|false]"); + this.setCommandUsage(String.format("/mv create %s{NAME} {ENV} %s-s [SEED] -g [GENERATOR[:ID]] -t [WORLDTYPE] [-n] -a [true|false]", + ChatColor.GREEN, ChatColor.GOLD)); this.setArgRange(2, 11); // SUPPRESS CHECKSTYLE: MagicNumberCheck this.addKey("mvcreate"); this.addKey("mvc"); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java index 0a1b7131..90084e71 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java @@ -130,10 +130,10 @@ public class ImportCommand extends MultiverseCommand { String generator = CommandHandler.getFlag("-g", args); String typeString = CommandHandler.getFlag("-t", args); boolean allowStructures = true; - String structureString = CommandHandler.getFlag("-a", args); - if (structureString != null) { - allowStructures = Boolean.parseBoolean(structureString); - } + String structureString = CommandHandler.getFlag("-a", args); + if (structureString != null) { + allowStructures = Boolean.parseBoolean(structureString); + } boolean useSpawnAdjust = true; for (String s : args) { if (s.equalsIgnoreCase("-n")) { diff --git a/src/main/java/com/onarandombox/MultiverseCore/enums/AllowedPortalType.java b/src/main/java/com/onarandombox/MultiverseCore/enums/AllowedPortalType.java index 5635a035..cadfb1bd 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/enums/AllowedPortalType.java +++ b/src/main/java/com/onarandombox/MultiverseCore/enums/AllowedPortalType.java @@ -10,7 +10,7 @@ package com.onarandombox.MultiverseCore.enums; import org.bukkit.PortalType; /** - * Custom enum that adds all/none for allowing + * Custom enum that adds all/none for allowing portal creation. */ public enum AllowedPortalType { /** diff --git a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPortalListener.java b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPortalListener.java index 8abc0183..6f124b41 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPortalListener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPortalListener.java @@ -45,7 +45,7 @@ public class MVPortalListener implements Listener { /** * This is called when a portal is created as the result of another world being linked. - * @param event + * @param event The event where a portal was formed due to a world link */ @EventHandler public void portalForm(PortalCreateEvent event) {