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,10 +210,14 @@ public class TryToComplete
|
|||||||
|
|
||||||
if (this.addon.getChallengesSettings().isBroadcastMessages())
|
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.
|
||||||
"[name]", this.user.getName(), "[challenge]", this.challenge.getFriendlyName());
|
if (!player.getUniqueId().equals(this.user.getUniqueId()))
|
||||||
|
{
|
||||||
|
User.getInstance(player).sendMessage("challenges.name-has-completed",
|
||||||
|
"[name]", this.user.getName(), "[challenge]", this.challenge.getFriendlyName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -275,10 +279,14 @@ public class TryToComplete
|
|||||||
|
|
||||||
if (this.addon.getChallengesSettings().isBroadcastMessages())
|
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.
|
||||||
"[name]", this.user.getName(), "[level]", level.getFriendlyName());
|
if (!player.getUniqueId().equals(this.user.getUniqueId()))
|
||||||
|
{
|
||||||
|
User.getInstance(player).sendMessage("challenges.name-has-completed-level",
|
||||||
|
"[name]", this.user.getName(), "[level]", level.getFriendlyName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user