mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-24 11:36:53 +01:00
Disable broadcast message for user. #62
This commit is contained in:
parent
86b51df412
commit
7384afa262
@ -210,13 +210,17 @@ public class TryToComplete
|
||||
|
||||
if (this.addon.getChallengesSettings().isBroadcastMessages())
|
||||
{
|
||||
for (Player p : this.addon.getServer().getOnlinePlayers())
|
||||
for (Player player : this.addon.getServer().getOnlinePlayers())
|
||||
{
|
||||
User.getInstance(p).sendMessage("challenges.name-has-completed",
|
||||
// Only other players should see message.
|
||||
if (!player.getUniqueId().equals(this.user.getUniqueId()))
|
||||
{
|
||||
User.getInstance(player).sendMessage("challenges.name-has-completed",
|
||||
"[name]", this.user.getName(), "[challenge]", this.challenge.getFriendlyName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Item Repeat Rewards
|
||||
@ -275,12 +279,16 @@ public class TryToComplete
|
||||
|
||||
if (this.addon.getChallengesSettings().isBroadcastMessages())
|
||||
{
|
||||
for (Player p : this.addon.getServer().getOnlinePlayers())
|
||||
for (Player player : this.addon.getServer().getOnlinePlayers())
|
||||
{
|
||||
User.getInstance(p).sendMessage("challenges.name-has-completed-level",
|
||||
// Only other players should see message.
|
||||
if (!player.getUniqueId().equals(this.user.getUniqueId()))
|
||||
{
|
||||
User.getInstance(player).sendMessage("challenges.name-has-completed-level",
|
||||
"[name]", this.user.getName(), "[level]", level.getFriendlyName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.manager.setLevelComplete(this.user, level);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user