mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-23 18:55:11 +01:00
reorder isAuthAvailable call
This commit is contained in:
parent
6bc5bb3cb1
commit
3e1c7edb2d
@ -252,18 +252,20 @@ public class AuthMePlayerListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerLogin(PlayerLoginEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
if (player == null)
|
||||
if (player == null) {
|
||||
return;
|
||||
final String name = player.getName().toLowerCase();
|
||||
boolean isAuthAvailable = plugin.database.isAuthAvailable(name);
|
||||
}
|
||||
|
||||
final String name = player.getName().toLowerCase();
|
||||
if (Utils.isNPC(player) || Utils.isUnrestricted(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED)
|
||||
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isAuthAvailable = plugin.database.isAuthAvailable(name);
|
||||
if (!Settings.countriesBlacklist.isEmpty() && !isAuthAvailable && !plugin.authmePermissible(player, "authme.bypassantibot")) {
|
||||
String code = Utils.getCountryCode(event.getAddress().getHostAddress());
|
||||
if (((code == null) || Settings.countriesBlacklist.contains(code))) {
|
||||
|
Loading…
Reference in New Issue
Block a user