Skip to main content

UUID Fetcher

The UUID fetcher is a simple fetcher that fetches the name of a player from the UUID or the UUID from the name. The fetcher don´t fetch the texture url directly from the Mojang API, it uses the Minetools api.

Name from their UUID

val uniqueId = UUID.randomUUID() // UUID of the player to fetch
val name = UniqueIdFetcher.fetchName(uniqueId) // Name of the player

UUID from their name

val playerName = "Notch" // Name of the player to fetch
val uniqueId = NameFetcher.fetchUniqueId(playerName) // UUID of the player

Cache options

The fetcher stores all results in a hash map. If you want to force the fetcher to fetch the data again, you can use the useCache parameter.

val uniqueId = UUID.randomUUID() // UUID of the player to fetch
val name = UniqueIdFetcher.fetchName(uniqueId, useCache = false) // Name of the player (fetches the data again)
val playerName = "Notch" // Name of the player to fetch
val uniqueId = NameFetcher.fetchUniqueId(playerName, useCache = false) // UUID of the player (fetches the data again)