Fix unauthenticated recipients removed even chat is allowed.

This commit is contained in:
DNx5 2015-11-27 00:14:29 +07:00
parent 34e81b518f
commit e80c098e3d

View File

@ -57,6 +57,10 @@ public class AuthMePlayerListener implements Listener {
* @param event AsyncPlayerChatEvent
*/
private void handleChat(AsyncPlayerChatEvent event) {
if (Settings.isChatAllowed || Utils.checkAuth(event.getPlayer())) {
return;
}
Player player = event.getPlayer();
for (Player p : Utils.getOnlinePlayers()) {
if (!PlayerCache.getInstance().isAuthenticated(p.getName())) {
@ -64,14 +68,6 @@ public class AuthMePlayerListener implements Listener {
}
}
if (Settings.isChatAllowed) {
return;
}
if (Utils.checkAuth(player)) {
return;
}
event.setCancelled(true);
if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {
m.send(player, MessageKey.LOGIN_MESSAGE);