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