Posted April 9, 20169 yr Hi, I'm trying to make a mod for transporting players to other servers and I need to send the player's player.dat file to the destination server. I already have a way of doing this (a sort of webserver running in the mod) and a way to download the data to the world/playerdata directory. The problem is that I need to get the UUID of the player on the receiving side, and want to know if there's any way to get it on an offline server. I can use MojangApi for online servers, but so far skimming through the DedicatedServer code I havent found anything useful for resolving offline UUIDs. How does minecraft resolve them on servers with online mode off and how can I implement this (i.e. will the same player have a different UUID on two different offline servers?) Thanks! "Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why." -- Unknown
April 10, 20169 yr Author Thanks! I eventually found this in NetHandlerLoginServer: protected GameProfile func_152506_a(GameProfile p_152506_1_) { UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + p_152506_1_.getName()).getBytes(Charsets.UTF_); return new GameProfile(uuid, p_152506_1_.getName()); } "Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why." -- Unknown
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.