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

    Abrupt

    this is a continuation of one of my previous questions located here:
    http://forums.bukkit.org/threads/name-above-head.2980/

    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:
    PHP:
    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

    Shade

    Name above head. Skin is ruined.
    http://i.min.us/icdF2A.png

    It's also bad because it moves the player's data to a new file.
    http://i.min.us/ievgV6.png

    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