The problem currently with cMojangAPI is, that it blocks the server. There is a open issue on github.
For now I think cUrlClient could be used. The requests are done asynchronous and this won't block the server.
Result for my username:
4fd9f50b6b6143f7a99b8b5be71b52c3
Seadragon91
Source:
http://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time
https://api.cuberite.org/cUrlClient.html
For now I think cUrlClient could be used. The requests are done asynchronous and this won't block the server.
cUrlClient:Get("https://api.mojang.com/users/profiles/minecraft/<username>", function (a_Body, a_Data) if (a_Body) then -- Response received correctly, a_Body contains the entire response body, -- a_Data is a dictionary-table of the response's HTTP headers local tbUUIDName = cJson:Parse(a_Body) LOG(tbUUIDName.id) LOG(tbUUIDName.name) else -- There was an error, a_Data is the error message string LOG(a_Data) end end ) LOG("Request sent.")
Result for my username:
4fd9f50b6b6143f7a99b8b5be71b52c3
Seadragon91
Source:
http://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time
https://api.cuberite.org/cUrlClient.html