How to Change Color (Player/Tab)

Discussion in 'Plugin Development' started by edocsyl, May 30, 2012.

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



    Maby it's a very simple question maybe not.
    Can someone say me, how to change the color of the name over the Head inGame and the color of the name when i press Tab.

    Would be nice. Thx and Greez!
  2. To change the name color above a player's head, you need to use the SpoutPlugin API. If I'm not mistaken..
  3. Offline


    The client doesn't need it or ? Cuz im not using spout and can see the changes.
  4. Offline


    for the tab name:
    player.setPlayerListName(ChatColor.RED + player.getName());
    change red to your color, and dont forget to make the player object.
  5. Offline


  6. Offline


    Still need to know, how to change the color of the name over the head of the minecraft player.
  7. That has been discussed a lot on the forum, searching for it would already give you some threads about that, no need to redo the discussion.
  8. Decompile a plugin called Citizens. It had th efeature for NPCs.
  9. Offline


    I posted a thread about it, you can remove the entity of the player, and create a new NamedEntity in its place using packets. But you would have to do it every tick, and remove the OLD NamedEntity. It is very complicated. Ive tried it in one of my plugins. It is kind of buggy, the names display different, it is just weird. I would recommend spout if you want an easy way. :D


    No one does this, but keep in mind, THE NEW MOD API.
    No one understands how much this can change. Bukkit may be gone. The Minecraft Vanilla Server could have more features, and be sort of like its own "Bukkit" ( With plugins made with Mod API ). Who knows. But the Mod API could change EVERYTHING.

    My Thread:
    Also check out this extremely helpful thread on the topic:
  10. Offline


    I also saw on a server, they change the skin or the head to a minecraft wool block.
    I think i inform me about spout. This looks very interesting.

    Maby you have some good tutorials.
  11. Offline


    Yeah, I play on a server, called Warhub, which has its own plugin (By tommytony, the owner) named War.
    I help do some bug fixes and recommendations for him. The teams have their corresponding wool block color on their heads.
  12. Offline


    Ohh, Nice to see this.
  13. Offline


    Wtf man?
    My plugin has blue wool for blue team and red wool for red team...
    Where are you from?
  14. Offline


    Switzerland why? Btw. Sry for my bad english. :D
  15. Offline


    player.getInventory().getHelmet().setType(Material.DIRT); - sets the hat to dirt.
    Fl1pzta and ferrybig like this.
  16. Offline


    When changing the tablist you need to be careful because the maximum amount of characters that can be in a username on that list is 16 so you will need to substring usernames that are 15 or 16 characters long.
  17. Offline


    I slightly ventured into this today using the code provided by Acrobot and it is indeed possible, without really any modifications to his code. But the "random spazzing" of the player is the only problem I see, which he said would happen in his post. That really sucks, and it looks really bad. But on other servers in which I've seen name colors changed, there is not this side-effect.

    So there must be some other way to go about doing it without having the spazzing issue - anybody know?

    Proof that it's completely possible on a vanilla client:

    I'm sure the new mod API will have this - but it could be months before it's released. Why wait?
  18. [quote uid=90616683 name="kumpelblase2" post=1143433]That has been discussed a lot on the forum, searching for it would already give you some threads about that, no need to redo the discussion.[/quote]
    Its sad that absolute nobody here except you is able to use the search function. :(
    I don't even remember how often I linked (the sources of) this: <Edit by Moderator: Redacted mediafire url>

    BTW: No, it has no "random spazzing" cause it doesn't send two NamedEntitySpawned packets to everybody at every tick. It's damn lightweight...
    Last edited by a moderator: Nov 10, 2016
    CoKoC and ThatBox like this.
  19. Offline


    Haha, nice :p
    I see - you're modifying the EntityTracker, so it sends the custom name instead. Niice.
    However, this will break every new MC update, right?
  20. Didn't I say it's lightweight? ;)
    Not with every, only when they add in new (non mob) entities. But it should be fast to update by simply copy&pasting the new if for it from notch code.
  21. Offline



    Thx for the plugin! Awesome!
  22. Offline


    Will this mess up permission plugin or and commands that involve the players name? I read in a thread similar that it would? Is this true? Thanks!

    Any way without changing the skin? Like in a few other servers?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2016
  23. Offline


    If you wish to not break the skin you have to use Spout and SpoutCraft which can be very annoying for players.
  24. No, it only manipulates the packages the server sends to the clients. The server itself still knows the original name, so nothing is messed up. Have a look at the sources (which are included in the jar file) for more information. ;)
    ThatBox likes this.
  25. Offline


    Isn't the tab+autocomplete functionality client side though? Though probably plugins that do partial name lookups would do fine, or typing the name as shown would work normally.
  26. Offline


    How do I make the Player Object???? I need this by today so please reply!!!
  27. Offline


    You don't make a player object, you get one from the event.
  28. Offline


    Hi. Im a no0b at making plugins. Im trying to make it so that its not just one /<command>. I want it more to be like /<command> <color>.

    I understand, i suck. But thats why i need your help!!!
  29. Offline


    Where should i type that?
  30. Offline


    To change the overhead name either use spout, or actually change it using entity trackers, which can cause problems with player.dat files. The third option is to use packets.
Thread Status:
Not open for further replies.

Share This Page