Posted May 18, 201411 yr Currently I have a small issue with porting my mod to 1.7 and upwards. Because of the new login system I managed to change every use of the user name from the player to his persistent UUID. With use I mean that I reference a player somehow(mostly NBT) by its name. I did this because of the new name changes, that will get launched soon(first supported in 1.7.2). So now my issue: When I have my UUID stored in NBT, I want to read it, and then render the name of the user on the screen. I solved this, by writing a method which iterates over all connected players, and returns the matching player or null. So this is the problem. I only get the name of players, which are online. I do not want to store my own list in the savegame, because I think minecraft manages its own list in the save game. The question: How to access this list, if it actually exists? Please help. try { ... }catch(Throwable t) { MagicAppErrorSolver.solveProblem(t, this); } //Programmers will lose work
May 18, 201411 yr Author Sorry I just found out, that 1.7.2 does not fully support name changes. This would be 1.7.9. It is kind of strange, but in my mod UUID is working (to check, if they match and so on). I will keep my code, and wait for the eventual forge update. try { ... }catch(Throwable t) { MagicAppErrorSolver.solveProblem(t, this); } //Programmers will lose work
May 19, 201411 yr Did you get any further on this? For now, I'm using displayname, but that concerns me for later on. Long time Bukkit & Forge Programmer Happy to try and help
May 19, 201411 yr diesieben07, is that what you are going to use going forward or keep using some versions of names? Do you know when they allow name changes, will it keep the same master account name and only change displayname or something? I've got a permisssion system mod setup that most of my other mods use and it makes it easy to give players access to commands and features, but it uses player names. UUID in that config file would be a bit unweildy. Long time Bukkit & Forge Programmer Happy to try and help
May 19, 201411 yr Thanks. How would you suggest doing that with a config file for permissions? I can't see a way to do that outside of using the UUID, but that will be challenging to read and maintain. Long time Bukkit & Forge Programmer Happy to try and help
May 19, 201411 yr In game should not be an issue. Was more trying to think of how to make it readable in the txt file. Long time Bukkit & Forge Programmer Happy to try and help
May 19, 201411 yr That is helpfull. If name was only there, could add uuid from a lookup. Cool, thanks. Long time Bukkit & Forge Programmer Happy to try and help
May 24, 201411 yr Author I think, I am a little bit late with this reply but thanks for the help. As of now I translated everything in my mod to the new UUID system. I hope this will help me to port my mod faster to 1.8. try { ... }catch(Throwable t) { MagicAppErrorSolver.solveProblem(t, this); } //Programmers will lose work
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.