getPlayer Deprecated?

Discussion in 'Plugin Development' started by Dolphineer, May 17, 2014.

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

    Dolphineer

    What is the new replacement for getPlayer? I can't seem to find any documentation.
     
  2. Offline

    Gater12

    Dolphineer
    getPlayer is deprecated to raise awareness for UUID changes. They still work just as fine and the deprecation will be removed in 1.8 if not already.
     
  3. Offline

    MrSparkzz

    Gater12
    One thing I've been thinking about is how the hell am I gonna recode my plugins to use UUID's instead of player names. There are some situations where I find that getting a player is only possible through Strings for example if you're trying to get a player from an input string from another player (something like "/tell blahblahblah hello buddy!").

    Will you still be able to get a player by a string after 1.8?
     
  4. Offline

    Dolphineer

    Yes but what is the new syntax instead of getPlayer?
     
  5. Offline

    Gater12

    MrSparkzz
    Yes. /tell, /msg, /tpa generally require the other player to be online, and their names aren't going to constantly change if they're online. Usually, you use UUID if you want to tie data to a player like economy and such.

    Dolphineer
    getPlayer() and getPlayerExact() and getOfflinePlayer() work perfectly fine for what they are intended to be used for and they were just deprecated to raise awareness for UUID, since 1.8 is going to allow player's to change their names. The deprecation on those methods will be removed soon.
     
  6. Offline

    Dolphineer

    Thanks.
     
  7. Offline

    RRServer

    UUIDs should only need to be implemented in plugins that store data (Currencies, permissions, etc)

    getPlayer was Deprecated to raise developer awareness.
     
Thread Status:
Not open for further replies.

Share This Page