PC-1178
This commit is contained in:
parent
ca452463db
commit
40648cf715
@ -205,22 +205,6 @@ public class Chat extends MiniPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void removeChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (event.isAsynchronous())
|
||||
{
|
||||
for (Iterator<Player> playerIterator = event.getRecipients().iterator(); playerIterator.hasNext();)
|
||||
{
|
||||
if (!_preferences.get(playerIterator.next()).isActive(Preference.SHOW_CHAT))
|
||||
playerIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onSignChange(SignChangeEvent event)
|
||||
{
|
||||
@ -403,6 +387,11 @@ public class Chat extends MiniPlugin
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.isAsynchronous())
|
||||
{
|
||||
event.getRecipients().removeIf(player -> !_preferences.get(player).isActive(Preference.SHOW_CHAT));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean msgContainsHack(String msg)
|
||||
|
Loading…
Reference in New Issue
Block a user