mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-22 00:27:36 +01:00
Attempt to Fix #407
This commit is contained in:
parent
5ec1b67e03
commit
627db6b9cf
@ -274,8 +274,8 @@ public class AuthMePlayerListener implements Listener {
|
||||
// Get the permissions manager
|
||||
PermissionsManager permsMan = plugin.getPermissionsManager();
|
||||
|
||||
if (event.getResult() == PlayerLoginEvent.Result.KICK_FULL
|
||||
&& permsMan.hasPermission(player, PlayerPermission.IS_VIP)) {
|
||||
if (event.getResult() == PlayerLoginEvent.Result.KICK_FULL) {
|
||||
if (permsMan.hasPermission(player, PlayerPermission.IS_VIP)) {
|
||||
int playersOnline = Utils.getOnlinePlayers().size();
|
||||
if (playersOnline > plugin.getServer().getMaxPlayers()) {
|
||||
event.allow();
|
||||
@ -290,18 +290,17 @@ public class AuthMePlayerListener implements Listener {
|
||||
event.setResult(PlayerLoginEvent.Result.KICK_FULL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
event.setKickMessage(m.retrieveSingle(MessageKey.KICK_FULL_SERVER));
|
||||
event.setResult(PlayerLoginEvent.Result.KICK_FULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getResult() == PlayerLoginEvent.Result.KICK_FULL && !permsMan.hasPermission(player, PlayerPermission.IS_VIP)) {
|
||||
event.setKickMessage(m.retrieveSingle(MessageKey.KICK_FULL_SERVER));
|
||||
event.setResult(PlayerLoginEvent.Result.KICK_FULL);
|
||||
return;
|
||||
}
|
||||
|
||||
final String name = player.getName().toLowerCase();
|
||||
boolean isAuthAvailable = plugin.getDataSource().isAuthAvailable(name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user