Solved Check if username has been taken

Discussion in 'Plugin Development' started by Zombie_Striker, May 20, 2015.

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

    Zombie_Striker

    I have a head plugin that I created and I was wondering if there is a way to check if an account exists. Is there a method I can use to check if the username has been taken, meaning that the account exists?
     
  2. Offline

    Konato_K

    @Zombie_Striker The haspaid link from Mojang works, however, they said it's a bit inaccurate due to the name changes (I guess those are cached and this it has a little delay, but works fine).
     
  3. Offline

    Zombie_Striker

    @Konato_K How would I use this for my plugin? Where would I put in the player's name? How would the plugin read the response?
     
  4. Offline

    Nateb1121

    You could try getting the UUID of the player, if the player doesn't exist on Mojang's side it will return null.

    Here's a fun little class (taken from I think MD5...)
    http://pastebin.com/NCs2UhfR

    Just use getUUIDOf() and check if it returns null.
     
  5. Offline

    Zombie_Striker

Thread Status:
Not open for further replies.

Share This Page