I'm not sure if there is a method for this in the api, but you can save the list of each player's XUID with their name or scroll through the online players looking for which one has that xuid