Player Name

Discussion in 'Plugin Development' started by ewrs, Oct 5, 2018.

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

    ewrs

    Hey. How can I get the player's name through his UUID? How many looked, does not work ...

    If that :D
    9877f917-c5bb-4ea1-ae8b-1070db76fd1a
     
  2. Offline

    Zombie_Striker

    @ewrs
    1. To get a name of a player that joined your server, use Bukkit.getOfflinePlayer(....).getName();
    2. If the player never joined your server, you would need to do a lookup for the UUID. You can either do this manually by going to a site like mcuuid.net, or by calling the mojangAPI, which is:
      https://api.mojang.com/user/profiles/<uuid>/names (Note that this will also return all the old names as well, in case you need)
     
  3. Offline

    ewrs


    2. There is no such UUID there .. Although I checked the others, and they are not there either, except for Notch XD
     
  4. Offline

    The_Spaceman

    Player player = Bukkit.getPlayer(UUID.fromString("your uuid here"));
     
Thread Status:
Not open for further replies.

Share This Page