Don't notify the command sender twice if he's in the lobby or on a team while resetting zone.

This commit is contained in:
taoneill 2013-11-19 00:01:38 -05:00
parent 31a2deef0f
commit d4d5778175

View File

@ -81,8 +81,9 @@ public class PartialZoneResetJob extends BukkitRunnable implements Cloneable {
private void sendMessageToAllWarzonePlayers(String message) { private void sendMessageToAllWarzonePlayers(String message) {
for (Player player : War.war.getServer().getOnlinePlayers()) { for (Player player : War.war.getServer().getOnlinePlayers()) {
ZoneLobby lobby = ZoneLobby.getLobbyByLocation(player); ZoneLobby lobby = ZoneLobby.getLobbyByLocation(player);
if (zone.getPlayers().contains(player) if (player != PartialZoneResetJob.senderToNotify
|| (lobby != null && lobby.getZone() == zone)) { && (zone.getPlayers().contains(player)
|| (lobby != null && lobby.getZone() == zone))) {
War.war.msg(player, message); War.war.msg(player, message);
} }
} }