Solved Getting Player´s Name by using UUID

Discussion in 'Plugin Development' started by OverDodo, Jun 23, 2017.

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

    OverDodo

    Hey,

    So I am currently making a NickPlugin...
    As you maybe know, it "replaces" the Player with a "New Player" by using packets...
    Still, the uuid stays the same.

    Is there a way to get the real name of the Player, by using his UUID?
    I use the CustomName as a Store for the real name, but when another plugin uses the CustomNameMethod too, it would get messy..
    Please help me! c:
     
  2. Get player by running
    Code:
    Bukkit.getPlayer(UUID);
    and then run
    Code:
    player.getName();
    Sent from my Xperia M4 Aqua using Tapatalk
     
    OverDodo likes this.
  3. Here You Are

    Online players:
    -Bukkit.getPlayer(UUID.fromString(uuid)).getDisplayName();

    Making requests to the mojang server can/will be limited if you use it too much, however that depends on what you're requesting
     
    Last edited by a moderator: Jun 23, 2017
Thread Status:
Not open for further replies.

Share This Page