mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 04:38:03 +02:00
Do not display chat to unlogged/unregistered player
This commit is contained in:
parent
7dc9238288
commit
53437ed33c
@ -274,8 +274,14 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
if (Utils.getInstance().isUnrestricted(player))
|
if (Utils.getInstance().isUnrestricted(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PlayerCache.getInstance().isAuthenticated(name))
|
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||||
|
if (!Settings.isChatAllowed)
|
||||||
|
for (Player p : event.getRecipients()) {
|
||||||
|
if (!PlayerCache.getInstance().isAuthenticated(p.getName()))
|
||||||
|
event.getRecipients().remove(p);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String cmd = event.getMessage().split(" ")[0];
|
String cmd = event.getMessage().split(" ")[0];
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ settings:
|
|||||||
# And try to login with an another IP Address?
|
# And try to login with an another IP Address?
|
||||||
sessionExpireOnIpChange: false
|
sessionExpireOnIpChange: false
|
||||||
restrictions:
|
restrictions:
|
||||||
# Can unregistered players chat, care , that block all commands except followers
|
# Can unregistered/unlogged players chat and see chat, care , that block all commands except followers
|
||||||
allowChat: false
|
allowChat: false
|
||||||
# Commands allowed when a player is unlogged
|
# Commands allowed when a player is unlogged
|
||||||
allowCommands:
|
allowCommands:
|
||||||
|
Loading…
Reference in New Issue
Block a user