Get Player UUID

Discussion in 'Plugin Development' started by x128, Mar 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    x128

    As you know, Mojang is rolling out their new UUID system to allow for players to change their names. This creates a huge issue for servers because all data must now be stored with a UUID instead of a player name.

    My question is will p.getUniqueId() return the Mojang UUID of the player? Will that UUID be persistent through name changes?

    Thank you.
     
  2. Offline

    xXSniperzzXx_SD

    x128
    I think I remember seeing a forum before where it got the same value, but it was either this method or the minecraft player server that returned the UUID with "-" in it.
     
  3. Offline

    ShadowLAX

    x128 You might find this thread useful.
     
  4. Offline

    iiHeroo


    UUID's will never change.
     
  5. Offline

    xize

    x128
    the awnser is yes, through p.getUniqueId() you can retrieve the actually UUID the one mojang said for the name change feature, note in the past the UUID in p.getUniquedId() whas used for the entity in the world however thats not anymore probably only for other entitys not the Player entitys, to get it to work you need to use your server in online mode.

    also it should be persistance however you should keep the file names under the UUID name unless there is alot smarter way.

    i've wrote a detailed work around here: http://forums.bukkit.org/threads/name-changes.242865 though its may not the best way if you have lots of players;)

    I hope it helps a bit
     
Thread Status:
Not open for further replies.

Share This Page