From d169d27a2140952a08c23017ca98a4b97c09a400 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 27 Nov 2022 17:50:58 -0600 Subject: more refactoring rel. TumbleManager --- src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/MylesAndMore/tumble/commands') diff --git a/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java b/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java index 5b5b782..d27a5a8 100644 --- a/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java +++ b/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java @@ -24,7 +24,7 @@ public class SetWorldConfig implements CommandExecutor { // Check if the world is actually a world on the server if (Bukkit.getWorld(world) != null) { // Check if the world has already been configured - if (!Objects.equals(TumbleManager.getPlugin().getConfig().getString("gameWorld"), world)) { + if (!Objects.equals(TumbleManager.getGameWorld(), world)) { // Set the specified value of the world in the config under lobbyWorld TumbleManager.getPlugin().getConfig().set("lobbyWorld", world); // Save said config @@ -46,7 +46,7 @@ public class SetWorldConfig implements CommandExecutor { // Check if the world type is game else if (Objects.equals(args[1], "game")) { if (Bukkit.getWorld(world) != null) { - if (!Objects.equals(TumbleManager.getPlugin().getConfig().getString("lobbyWorld"), world)) { + if (!Objects.equals(TumbleManager.getLobbyWorld(), world)) { TumbleManager.getPlugin().getConfig().set("gameWorld", world); TumbleManager.getPlugin().saveConfig(); sender.sendMessage(ChatColor.GREEN + "Game world successfully linked: " + ChatColor.GRAY + world); -- cgit v1.2.3