Skip to content

Commit

Permalink
fix: change getUsernameFromUUID to minecraftservices.com
Browse files Browse the repository at this point in the history
old one still works but idk
  • Loading branch information
My-Name-Is-Jeff committed Feb 9, 2024
1 parent b59ec1a commit 674be29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/utils/MojangUtil.kt
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ object MojangUtil {

suspend fun getUsernameFromUUID(uuid: UUID): String? {
return uuidToUsername.getIfPresent(uuid) ?: run {
client.get("https://api.mojang.com/user/profile/${uuid}").let {
client.get("https://api.minecraftservices.com/minecraft/profile/lookup/${uuid}").let {
when (it.status) {
HttpStatusCode.OK -> {
val (_, name) = it.body<ProfileResponse>()

0 comments on commit 674be29

Please sign in to comment.