mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-01 06:33:35 +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
|
* @param event AsyncPlayerChatEvent
|
||||||
*/
|
*/
|
||||||
private void handleChat(AsyncPlayerChatEvent event) {
|
private void handleChat(AsyncPlayerChatEvent event) {
|
||||||
|
if (Settings.isChatAllowed || Utils.checkAuth(event.getPlayer())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
for (Player p : Utils.getOnlinePlayers()) {
|
for (Player p : Utils.getOnlinePlayers()) {
|
||||||
if (!PlayerCache.getInstance().isAuthenticated(p.getName())) {
|
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);
|
event.setCancelled(true);
|
||||||
if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {
|
if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {
|
||||||
m.send(player, MessageKey.LOGIN_MESSAGE);
|
m.send(player, MessageKey.LOGIN_MESSAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user