diff --git a/src/main/java/world/bentobox/challenges/listeners/ResetListener.java b/src/main/java/world/bentobox/challenges/listeners/ResetListener.java index 74c2339..df0d401 100644 --- a/src/main/java/world/bentobox/challenges/listeners/ResetListener.java +++ b/src/main/java/world/bentobox/challenges/listeners/ResetListener.java @@ -26,7 +26,7 @@ public class ResetListener implements Listener { @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onIslandReset(IslandEvent e) { - if (e.getReason().equals(Reason.CREATED) || (addon.getConfig().getBoolean("resetchallenges") && e.getReason().equals(Reason.RESETTED))) { + if (e.getReason().equals(Reason.CREATED) || (addon.getChallengesSettings().isResetChallenges() && e.getReason().equals(Reason.RESETTED))) { addon.getChallengesManager().resetAllChallenges(e.getOwner(), e.getLocation().getWorld()); } } diff --git a/src/main/java/world/bentobox/challenges/panel/TryToComplete.java b/src/main/java/world/bentobox/challenges/panel/TryToComplete.java index 2fa22ff..cb50e34 100644 --- a/src/main/java/world/bentobox/challenges/panel/TryToComplete.java +++ b/src/main/java/world/bentobox/challenges/panel/TryToComplete.java @@ -101,7 +101,7 @@ public class TryToComplete { // Run commands runCommands(challenge.getRewardCommands()); user.sendMessage("challenges.you-completed", "[challenge]", challenge.getFriendlyName()); - if (addon.getConfig().getBoolean("broadcastmessages", false)) { + if (addon.getChallengesSettings().isBroadcastMessages()) { for (Player p : addon.getServer().getOnlinePlayers()) { User.getInstance(p).sendMessage("challenges.name-has-completed", "[name]", user.getName(), "[challenge]", challenge.getFriendlyName()); @@ -166,7 +166,7 @@ public class TryToComplete { // Run commands runCommands(challenge.getRewardCommands()); user.sendMessage("challenges.you-completed", "[challenge]", challenge.getFriendlyName()); - if (addon.getConfig().getBoolean("broadcastmessages", false)) { + if (addon.getChallengesSettings().isBroadcastMessages()) { for (Player p : addon.getServer().getOnlinePlayers()) { User.getInstance(p).sendMessage("challenges.name-has-completed", "[name]", user.getName(), "[challenge]", challenge.getFriendlyName());