Fix fakePlayers of Leaves NPE error

This commit is contained in:
HaHaWTH 2024-01-29 22:52:54 +08:00
parent 4f0bc6d12f
commit 5f89964f49

View File

@ -28,7 +28,7 @@ public final class PlayerUtils {
* @return True if the player is an NPC, false otherwise
*/
public static boolean isNpc(Player player) {
return player.hasMetadata("NPC");
return player.hasMetadata("NPC") || player.getAddress() == null;
}
}