package Ġcom . hand truth . mc . minecraft Ċ Ċ import Ġcom . hand truth . mc . minecraft . model . Player ByName Response Ċ import Ġcom . hand truth . mc . minecraft . model . Profile Ċ import Ġcom . hand truth . mc . minecraft . model . Profile Context Ċ import Ġcom . hand truth . mc . minecraft . util . json Ċ import Ġio . ktor . client . HttpClient Ċ import Ġio . ktor . client . request . get Ċ import Ġkotlinx . serialization . Deserialization Strategy Ċ Ċ object ĠMo j ang Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġclient Ġ= ĠHttpClient () ĊĊĠĠĠ Ġprivate Ġsuspend Ġinline Ġfun Ġ< T > Ġinvoke Get Json Request ( url : ĠString , Ġde serializer : ĠDeserial ization Strategy < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġjson . parse ( de serializer , Ġclient . get ( url )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġconst Ġval Ġprofile Url Ġ= Ġ" https :// session server . moj ang . com / session / minecraft / profile /" ĊĊĠĠĠ Ġsuspend Ġfun Ġget Profile ( uuid : ĠUUID , Ġcontext : ĠProfile Context Ġ= ĠProfile Context . default ): ĠProfile Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontent Ġ= Ġclient . get < String >( profile Url Ġ+ Ġuuid . to Mo j ang UUID ()) ĊĠĠĠĠĠĠĠ ĠProfile Context . use ( context ) ĊĠĠĠĠĠĠĠ Ġreturn Ġjson . parse ( Profile . serializer (), Ġcontent ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġconst Ġval Ġuuid ByName Url Ġ= Ġ" https :// api . moj ang . com / users / profiles / minecraft /" ĊĊĠĠĠ Ġsuspend Ġfun Ġget UUID by Name ( name : ĠString ): ĠPlayer ByName Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinvoke Get Json Request ( uuid ByName Url Ġ+ Ġname , ĠPlayer ByName Response . serializer ()) ĊĠĠĠ Ġ} Ċ Ċ } Ċ