Cuberite Forum
UUID Changes - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: UUID Changes (/thread-1448.html)

Pages: 1 2


RE: UUID Changes - daniel0916 - 04-16-2014

Cracked login is working in 1.7.9.


RE: UUID Changes - daniel0916 - 04-19-2014

I added the GetUUID Method.
https://github.com/daniel0916/MCServer/commit/535e083791f1aa1470cc6647d2f9714fec44607c

Should i move it in a other class? or is it so good?


RE: UUID Changes - bearbin - 04-19-2014

Is cPlayer not for an individual player, so having it on every player is strange?


RE: UUID Changes - daniel0916 - 04-20-2014

Oh i forgot this.
Okay maybe cServer::GetPlayerUUID or what do you think?


RE: UUID Changes - xoft - 04-20-2014

Your change is silly, because it effectively duplicates most of the code in cAuthenticator.

Such a function would make sense to be static, so that it's not bound to a specific cPlayer instance, but it is still in the cPlayer class "namespace".


RE: UUID Changes - daniel0916 - 04-20-2014

Yes, the code is from cAuthenticator but with some changes for a POST request to the mojang api.

The GetUUID method is already static. Or what do you mean?


RE: UUID Changes - bearbin - 04-20-2014

Code should not be in two places at once.


RE: UUID Changes - xoft - 04-20-2014

Didn't see the static declaration.

I'm not sure if this function is a good idea. It it blocking, so it can pause the calling thread for considerable amounts of time. So it cannot be used from plugins at all, and only very few MCS threads can afford the pause.


RE: UUID Changes - daniel0916 - 04-20-2014

How can i fix this?
The function is for plugins to get the UUID of a playername. So the plugin can convert her ban lists etc. and add the UUID's.


RE: UUID Changes - xoft - 04-20-2014

I'd say the plugins that want to do this should implement the HTTP request / response handling by themselves; we should provide them with asynchronous (callback-based) sockets, SSL layer and perhaps HTTP client parsing.