mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-24 19:45:14 +01:00
Use proper Addon settings getters.
This commit is contained in:
parent
b8e0ca4331
commit
6c0ac96251
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user