mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +01:00
Fix unauthenticated recipients removed even chat is allowed.
This commit is contained in:
parent
34e81b518f
commit
e80c098e3d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user