From 94899286c562537e8849ef37c1bce2ef543f4832 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 27 Nov 2022 14:31:04 -0600 Subject: refactor: the PluginManager was too op, so we had to nerf it it is now TumbleManager because I just realized bukkit already has something called PluginManager --- .../com/MylesAndMore/tumble/commands/SetWorldConfig.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java') diff --git a/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java b/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java index 6a78233..0a7696d 100644 --- a/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java +++ b/src/main/java/com/MylesAndMore/tumble/commands/SetWorldConfig.java @@ -1,6 +1,6 @@ package com.MylesAndMore.tumble.commands; -import com.MylesAndMore.tumble.PluginManager; +import com.MylesAndMore.tumble.TumbleManager; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -24,11 +24,11 @@ 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(PluginManager.getPlugin().getConfig().getString("gameWorld"), world)) { + if (!Objects.equals(TumbleManager.getPlugin().getConfig().getString("gameWorld"), world)) { // Set the specified value of the world in the config under lobbyWorld - PluginManager.getPlugin().getConfig().set("lobbyWorld", world); + TumbleManager.getPlugin().getConfig().set("lobbyWorld", world); // Save said config - PluginManager.getPlugin().saveConfig(); + TumbleManager.getPlugin().saveConfig(); // Feedback sender.sendMessage(ChatColor.GREEN + "Lobby world successfully linked: " + ChatColor.GRAY + world); sender.sendMessage(ChatColor.RED + "Please restart your server for the changes to take effect; reloading the plugin is insufficient!"); @@ -46,9 +46,9 @@ 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(PluginManager.getPlugin().getConfig().getString("lobbyWorld"), world)) { - PluginManager.getPlugin().getConfig().set("gameWorld", world); - PluginManager.getPlugin().saveConfig(); + if (!Objects.equals(TumbleManager.getPlugin().getConfig().getString("lobbyWorld"), world)) { + TumbleManager.getPlugin().getConfig().set("gameWorld", world); + TumbleManager.getPlugin().saveConfig(); sender.sendMessage(ChatColor.GREEN + "Game world successfully linked: " + ChatColor.GRAY + world); sender.sendMessage(ChatColor.RED + "Please restart your server for the changes to take effect; reloading the plugin is insufficient!"); } @@ -67,7 +67,7 @@ public class SetWorldConfig implements CommandExecutor { } // Feedback for if sender has no perms else { - sender.sendMessage(ChatColor.RED + PluginManager.getPermissionMessage()); + sender.sendMessage(ChatColor.RED + TumbleManager.getPermissionMessage()); } } // Feedback for if no args were entered -- cgit v1.2.3