mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 12:45:57 +01:00
Try to fix NPC issues
This commit is contained in:
parent
be1eb9392a
commit
2c0d140da9
@ -220,7 +220,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
if (event.getPlayer() == null) {
|
||||
if (event.getPlayer() == null || Utils.isNPC(event.getPlayer())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
public void onPreLogin(AsyncPlayerPreLoginEvent event) {
|
||||
final String name = event.getName().toLowerCase();
|
||||
final Player player = Utils.getPlayer(name);
|
||||
if (player == null) {
|
||||
if (player == null || Utils.isNPC(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ public final class Utils {
|
||||
|
||||
// TODO: Move to a Manager
|
||||
public static boolean checkAuth(Player player) {
|
||||
if (player == null || Utils.isUnrestricted(player)) {
|
||||
if (player == null || Utils.isUnrestricted(player) || Utils.isNPC(player)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user