Fixed players with notignorable missing chat.

Players who ignored "notignorable" players were chatting invisibly to
those notignorable players.
This commit is contained in:
ryanhamshire 2016-06-16 11:12:41 -07:00
parent 0e6d7bf11f
commit 38d7937e9d

View File

@ -183,6 +183,8 @@ class PlayerEventHandler implements Listener
Set<Player> recipientsToRemove = new HashSet<Player>(); Set<Player> recipientsToRemove = new HashSet<Player>();
PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId()); PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());
for(Player recipient : recipients) for(Player recipient : recipients)
{
if(!recipient.hasPermission("griefprevention.notignorable"))
{ {
if(playerData.ignoredPlayers.containsKey(recipient.getUniqueId())) if(playerData.ignoredPlayers.containsKey(recipient.getUniqueId()))
{ {
@ -197,6 +199,7 @@ class PlayerEventHandler implements Listener
} }
} }
} }
}
recipients.removeAll(recipientsToRemove); recipients.removeAll(recipientsToRemove);
} }