Player getName method deprecated

Discussion in 'Plugin Development' started by Mike724, Apr 15, 2014.

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

    Mike724

    Here is the usage:
    [​IMG]

    In the javadoc it says it was deprecated because it is a "magic number". I'm developing against API 1.7.5-R0.1.

    Am I doing something wrong, or is getName really deprecated? If so, what is the replacement? I've been away from the Minecraft scene for a while so I may be missing out on some crucial information.

    I don't want to use getDisplayName or similar because it can be changed.
     
  2. Offline

    Glumpz

    The name is deprecated but still works. The Bukkit team is trying to get Bukkit developers away from using player name and towards using player UUID's. No need to worry, you're fine. I would just recommend using a UUID solution.
     
  3. Offline

    Mike724

    I just refreshed maven and got the latest artifact (1.7.8), and it seems to no longer be deprecated (?). I'm pretty confused at the moment.

    Are you referring to Player.getUniqueID()? I'm assuming this would just be a long string/number/hash. Would that always be the same, even across different servers?
     
Thread Status:
Not open for further replies.

Share This Page