player.getName()

Discussion in 'Plugin Development' started by tschagg, Jan 23, 2013.

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

    tschagg

    hey guys, i made a chat plugin, and have a question now.
    when i /nick me (essentials), my name dont change, bcause i took only player.getName().

    what i have to do to get the essentials displayname?

    thanks!
     
  2. try player.getDisplayName()
     
    tschagg likes this.
  3. Offline

    ritonda66

    Are you using essentialsChat? If yes remove it
     
  4. Offline

    tschagg

    ok thanks!
     
  5. Offline

    Johnzeh

    This will set the players name to whatever is the second argument, such as /nick me Johnzeh2

    if(cmd.getName().equalsIgnoreCase("nick") {
    if(args[0].equalsIgnoreCase("me") {
    player.setDisplayName(args[1]);

    As for getting the players display name from essentials, do
    player.getDisplayName();

    You can do more with that like color intergration if you want to.
     
    tschagg likes this.
Thread Status:
Not open for further replies.

Share This Page