diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CloneCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CloneCommand.java index e5849852..d3726f8b 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CloneCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CloneCommand.java @@ -26,13 +26,13 @@ public class CloneCommand extends MultiverseCommand { @Description("Clones a world.") public void onCloneCommand(CommandIssuer issuer, - @Conditions("worldname:scope=both") + @Conditions("validWorldName:scope=both") @Syntax("") @Description("The target world to clone.") String worldName, @Single - @Conditions("worldname:scope=new") + @Conditions("validWorldName:scope=new") @Syntax("") @Description("The new cloned world name.") String newWorldName diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java index f873133d..e3cd56eb 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java @@ -84,7 +84,7 @@ public class CreateCommand extends MultiverseCommand { @Description("{@@mv-core.create_description}") public void onCreateCommand(BukkitCommandIssuer issuer, - @Conditions("worldname:scope=new") + @Conditions("validWorldName:scope=new") @Syntax("") @Description("{@@mv-core.create_name_description}") String worldName, diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/DeleteCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/DeleteCommand.java index 330499ae..0d643f89 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/DeleteCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/DeleteCommand.java @@ -28,7 +28,7 @@ public class DeleteCommand extends MultiverseCommand { public void onDeleteCommand(BukkitCommandIssuer issuer, @Single - @Conditions("worldname:scope=both") + @Conditions("validWorldName:scope=both") @Syntax("") @Description("The world you want to delete.") String worldName diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/LoadCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/LoadCommand.java index 4f09194e..ac9cdf65 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/LoadCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/LoadCommand.java @@ -26,7 +26,7 @@ public class LoadCommand extends MultiverseCommand { public void onLoadCommand(BukkitCommandIssuer issuer, @Single - @Conditions("worldname:scope=unloaded") + @Conditions("validWorldName:scope=unloaded") @Syntax("") @Description("Name of world you want to load.") String worldName diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java index f5b6eff5..b7265b1f 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java @@ -45,7 +45,7 @@ public class RegenCommand extends MultiverseCommand { @Description("Regenerates a world on your server. The previous state will be lost PERMANENTLY.") public void onRegenCommand(BukkitCommandIssuer issuer, - @Conditions("worldname:scope=both") + @Conditions("validWorldName:scope=both") @Syntax("") @Description("World that you want to regen.") String worldName, diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandConditions.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandConditions.java index 9202dd8d..7bf735b6 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandConditions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandConditions.java @@ -24,12 +24,12 @@ public class MVCommandConditions { CommandConditions conditions = commandManager.getCommandConditions(); - conditions.addCondition(String.class, "worldname", this::checkWorldName); + conditions.addCondition(String.class, "validWorldName", this::checkValidWorldName); } - private void checkWorldName(ConditionContext context, - BukkitCommandExecutionContext executionContext, - String worldName + private void checkValidWorldName(ConditionContext context, + BukkitCommandExecutionContext executionContext, + String worldName ) { String scope = context.getConfigValue("scope", "loaded");