Skip to content

Commit

Permalink
Send PVP toggle messages only to players on island.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Dec 8, 2021
1 parent 79abf96 commit 4309c5b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ public void onPVPFlagToggle(final FlagSettingChangeEvent e) {
String message = "protection.flags." + flag.getID() + "." + (e.isSetTo() ? "enabled" : "disabled");
// Send the message to visitors
e.getIsland().getVisitors().forEach(visitor -> User.getInstance(visitor).sendMessage(message));
// Send the message to island members (and coops and trusted)
e.getIsland().getMemberSet(RanksManager.COOP_RANK).forEach(member -> User.getInstance(member).sendMessage(message));
// Send the message to players on the island
e.getIsland().getPlayersOnIsland().forEach(player -> User.getInstance(player).sendMessage(message));
}
}

Expand Down

0 comments on commit 4309c5b

Please sign in to comment.