getProfile

suspend fun getProfile(player: String): PlayerProfile

Fetches a player's profile from Mojang's session server.

The input can be either:

  • A UUID (with or without dashes, 32–36 characters), or

  • A valid Minecraft username (3–16 characters, letters, digits, and underscores).

Return

A PlayerProfile containing the player's UUID, username, skin, cape, and model type.

Parameters

player

The player's UUID or username.

Throws

if the input is neither a valid UUID nor a valid username.