Player profile

Discussion in 'Spigot Plugin Development' started by MrThunder_, May 5, 2015.

  1. Hi guys,

    I'm making a plugin that registers the player to a Mysql database, every player has his own player profile.

    username: MrThunder_
    coins: 4400
    - Luckybastard2: Cheating and hacking
    - Notanotherguy: Offensive language

    (should I add those to?)
    uuid: --
    ip: 111.111.111
    country: England (geolocation based of player ip)

    What do you guys think? Are there things I should add?
  2. clip


    Well. Your primary key in your database should be uuid in case the player changes his name for sure.
    • Agree Agree x 1
  3. @extended_clip Wow, I totally forgot that. Shouldn't make the player profile based of his username, but uuid.
  4. Other suggestions guys?
  5. Even better, use a random thing (incrementing number maybe?) instead of an uuid, since there is no need to risk everything on uuids working perfectly
    • Agree Agree x 1
  6. Wait wat.
    • Agree Agree x 1
  7. [​IMG]
  8. JamesJ


    No lol.
  9. agree. I've seen some cases that name change resulted in the changes of UUID... but if you make your own are you going to maintain it? and make that associated with UUID/name/etc..
  10. JamesJ


    Please, a UUID does not change when a name changes, that defies the whole objective of a Universally Unique Indentifier -facedesk-
  11. i know, but I do know cases that name change indeed changed UUID as well.
  12. On offline mode servers maybe, this would never happen on online mode servers.
  13. obviously you haven't seen it.. I came across with this when I was testing my CheckNameHistory plugin. I was pulling out players who claimed that their UUID changed and when I pulled this player's record from Mojang.. it was different from his previous one.
  14. JamesJ


    Well if you knew that, you'd know that a UUID does NOT change.
  15. are you reading my post?? i know what the UUID is and why Mojang switched to using UUID...

    what I'm pointing out is for some odd reason, there were cases the name change did trigger the change of UUID.
  16. If I don't know what I'm talking about UUID, I would not have implemented UUID support in Lockette plugin...
  17. JamesJ


    I cannot say that any other way.
    A UUID will not change. It never has. Never will. Never can.
    The whole point of a UUID is that they don't chance.

    Chances are, you enter the name of Player2, who changed their name to Player1's old name. Which would not change the UUID, it would be a different player.
    Its impossible to change a UUID.
  18. If you ever actually pulled information form Mojang's service or not, but all I'm saying that's exactly what happened. we were all puzzled why this happened. but fact is
    • player1 had UUID1
    • player1 changed the name to player2
    • player2's UUID was different from UUID1
    When these pieces of data came from Mojang, how do you explain it? I could not. I'm not saying UUID is something changes. AS WE ALL KNOW, it does not change.. that's the whole point.. when something what is not supposed to change did change.
  19. well then you found a problem in the UUID system which is used by many billion dollar services.
    which I doubt.

    I am sure there is some explanation for why that happened.
    • Agree Agree x 1
  20. nonono, I'm not saying UUID itself is wrong. nor algorithm to generate UUID form pieces of information is wrong.

    When some users were presented with two different UUIDs, before and after the name changes (this is the fact), one can only speculate that there must have been some business process error. This is different form claiming that UUID system itself has a bug.