Solved Essentials /Nick - Using my own ChatLayout

Discussion in 'Plugin Development' started by ImaTimelord7, Sep 10, 2015.

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

    ImaTimelord7

    So I am using my own plugin to create a layout for chat, because I need to add information to the format that I cannot get from essentials. However I have no idea how Essentials stores and/or works out whether to use Nick/Name or how it does that.. Or how to get Essentials Nick to use in my plugin :S

    How do I get a Nickname for a player, from Essentials, within my own plugin?

    Hopefully this makes sense...
     
  2. Offline

    SuperSniper

    @ImaTimelord7 Just under curiosity, why do you want to use Essentials' nick names, and not your own?
    Creating your own nickname system would be much much easier
     
  3. Offline

    Geekxboy

    If you are set on using the Essentials API to get the player nickname then all you need to do is
    1) hook into essentials
    2) get the essentials user
    Code:
    User user = ess.getUserMap().getUser(uuid);
    3) get the display name
    Code:
    user.getBase().getDisplayName()
    You might also just be able to use Bukkit's built in player.getDisplayName()
     
Thread Status:
Not open for further replies.

Share This Page