Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.