Cuberite Forum
What's wrong with getting the UUID in this function? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: What's wrong with getting the UUID in this function? (/thread-2211.html)

Pages: 1 2


RE: What's wrong with getting the UUID in this function? - NiLSPACE - 11-20-2015

It's highly advised to only use non-cached on startup. Otherwise it can lagg the server. Cached only works when the user already came online. Perhaps we should add a cMojangAPI:FindPlayerName(a_UserName, a_OnFindCallback). It would connect to the mojang server async to add a user + UUID in our database.


RE: What's wrong with getting the UUID in this function? - Gamerboy59 - 11-20-2015

(11-20-2015, 03:45 AM)NiLSPACE Wrote: It's highly advised to only use non-cached on startup. Otherwise it can lagg the server. Cached only works when the user already came online. Perhaps we should add a cMojangAPI:FindPlayerName(a_UserName, a_OnFindCallback). It would connect to the mojang server async to add a user + UUID in our database.

Yes, this would be a great feature. For now I changed the error message so it says the user need to be online once.
But now, what's the difference between the cached-mojangapi and the normal GetUUID?

Ohh and the file system thing doesn't work well with windows. Double back-slash is better. Wink


RE: What's wrong with getting the UUID in this function? - NiLSPACE - 11-20-2015

The cached MojangAPI can be used even if a player is offline (but was online at least once) while the GetUUID is used on a cClientHandle or cPlayer object meaning the player has to be online.

Really? I used it before on my WorldEdit, but I got people complaining that it didn't work: 1 2


RE: What's wrong with getting the UUID in this function? - Gamerboy59 - 11-20-2015

(11-20-2015, 05:24 AM)NiLSPACE Wrote: The cached MojangAPI can be used even if a player is offline (but was online at least once) while the GetUUID is used on a cClientHandle or cPlayer object meaning the player has to be online.
Alright, thanks. Smile
(11-20-2015, 05:24 AM)NiLSPACE Wrote: Really? I used it before on my WorldEdit, but I got people complaining that it didn't work: 1 2
Well, but they're obviously using a Linux server but I get the issue with a windows server. For Linux (e.g. Ubuntu or CentOS) a normal slash seems to be working and for windows a double-back-slash. What I'm about is the cFile class.


RE: What's wrong with getting the UUID in this function? - NiLSPACE - 11-20-2015

Yeah, but the WorldEdit plugin is still working just fine on both a Linux and a Windows server. Smile And it's still using a / instead of a \\