From dd5fb49065c095cf421f6cde23631e001a62c33c Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Sat, 21 May 2016 18:08:26 +0200 Subject: [PATCH] Whoops forgot to commit this #719 --- .../fr/xephi/authme/listener/AuthMePlayerListener.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java index 82979a02e..03aaca4f6 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java @@ -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 recipients = event.getRecipients(); Iterator iter = recipients.iterator();