From 495beb970c5bda1ca0077ec637bcbc5463662782 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sun, 23 Jan 2022 11:58:13 +0100 Subject: [PATCH] Allows both any and all for selecting all worlds for permission targets --- .../net/knarcraft/permissionsigns/command/CreateCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/knarcraft/permissionsigns/command/CreateCommand.java b/src/main/java/net/knarcraft/permissionsigns/command/CreateCommand.java index 58c8740..cc1db6b 100644 --- a/src/main/java/net/knarcraft/permissionsigns/command/CreateCommand.java +++ b/src/main/java/net/knarcraft/permissionsigns/command/CreateCommand.java @@ -61,7 +61,8 @@ public class CreateCommand implements CommandExecutor { for (String permission : permissions) { if (permission.contains(":")) { String world = permission.split(":")[0]; - if (!world.equalsIgnoreCase("all") && Bukkit.getWorld(world) == null) { + if (!world.equalsIgnoreCase("all") && !world.equalsIgnoreCase("any") && + Bukkit.getWorld(world) == null) { sender.sendMessage(StringFormatter.replacePlaceholder(StringFormatter.getTranslatedErrorMessage( TranslatableMessage.PERMISSION_WORLD_INVALID), "{world}", world)); return null;