entity.get_player_name(entindex)
Returns the player name for a player entity, fallbacks to UUID or the string “unknown” on failure.