editing the names above player's heads upon join

Discussion in 'Plugin Development' started by Abrupt, Feb 3, 2011.

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


    this is a continuation of one of my previous questions located here:

    My original question was how to set player's display names above their head while the player was in the game, yet I've now noticed that changing the player's display name above their head upon join/login also doesn't seem to work.

    I've tried this on both onPlayerJoin and onPlayerLogin events:
    Player player event.getPlayer();
    player.setDisplayName("[TEST] " player.getDisplayName());
    And of course I used the proper hooks (and tried changing the priority levels), yet only the name in messages was changed to contain the prefix "[TEST]".

    Any help would be greatly appreciated.
  2. Offline


    Name above head. Skin is ruined.

    It's also bad because it moves the player's data to a new file.

    In case you still want to do this terrible attrocity.
    Import craftbukkit.

    CraftPlayer p = (CraftPlayer)player;
    p.getHandle().name = "[test] " + p.getHandle().name;
Thread Status:
Not open for further replies.

Share This Page