fix: oversite in mowojang - username -> name
This commit is contained in:
@@ -189,6 +189,6 @@ data class PlayerData(
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MowojangNameLookup(
|
data class MowojangNameLookup(
|
||||||
val username: String,
|
val name: String,
|
||||||
val id: UUID,
|
val id: UUID,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ object Routes {
|
|||||||
if (!response.status.isSuccess()) return@async null
|
if (!response.status.isSuccess()) return@async null
|
||||||
val data = response.body<MowojangNameLookup>()
|
val data = response.body<MowojangNameLookup>()
|
||||||
launch(MinecraftDispatcher) {
|
launch(MinecraftDispatcher) {
|
||||||
nameToUUID[data.username] = async { data.id }
|
nameToUUID[data.name] = async { data.id }
|
||||||
}
|
}
|
||||||
data.username
|
data.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.await()
|
}.await()
|
||||||
@@ -48,7 +48,7 @@ object Routes {
|
|||||||
if (!response.status.isSuccess()) return@async null
|
if (!response.status.isSuccess()) return@async null
|
||||||
val data = response.body<MowojangNameLookup>()
|
val data = response.body<MowojangNameLookup>()
|
||||||
launch(MinecraftDispatcher) {
|
launch(MinecraftDispatcher) {
|
||||||
UUIDToName[data.id] = async { data.username }
|
UUIDToName[data.id] = async { data.name }
|
||||||
}
|
}
|
||||||
data.id
|
data.id
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user