Whoops forgot to commit this #719

This commit is contained in:
Gabriele C 2016-05-21 18:08:26 +02:00
parent e0ef0e40c7
commit dd5fb49065

View File

@ -139,9 +139,12 @@ public class AuthMePlayerListener implements Listener {
final Player player = event.getPlayer();
if (shouldCancelEvent(player)) {
event.setCancelled(true);
// TODO: a spambot calls this too often, too many threads checking if auth is available.
// Possible solution: add a cooldown. -sgdc3
// sendLoginOrRegisterMessage(player);
bukkitService.runTaskAsynchronously(new Runnable() {
@Override
public void run() {
m.send(player, MessageKey.DENIED_CHAT_MESSAGE);
}
});
} else if (settings.getProperty(RestrictionSettings.HIDE_CHAT)) {
Set<Player> recipients = event.getRecipients();
Iterator<Player> iter = recipients.iterator();