TagAPI - Change/color the name over people's heads!

Discussion in 'Resources' started by mbaxter, Sep 6, 2012.

  1. Yes, you would have to hook into the Nocheat API.
  2. update to 1.5 pl0x
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    It is. It has been. Please check before requesting.
  4. Just downloaded v2.2, keep up the good work! :)
  5. Offline


    i copied the first example code and i STILL got an error on this line: public void onNameTag(PlayerReceiveNameTagEvent event) {

    i dont even know what the error is i copied the example code exactly!
  6. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

  7. Offline


    Hello, I would like to edit a plugin I use (Simple Prefix) to support TagAPI and display the prefix in front of the username, above the players head.
    However, I have about no know knowledge in coding with java, so I was wondering if anybody could possibly help me? :)
  8. How do i call the PlayerReceiveNameTag event?
  9. Offline


    Hello !
    How to associate a color to a permission group please ?
    If I want my " viking " group have a blue name, how can I do ?
    Cordialy !
  10. Offline


    Any Commands for Renaming the NameTAG ? So the tag above my player, displays an other name ?
  11. TagAPI is exactly what the name implies; an API. Another plugin has to do that.
  12. Offline


  13. You don't call it, you listen for it. When the TagAPI plugin exists on the server it calls the events.
    mbaxter likes this.
  14. Gravity
    Oh Great thanks works perfectly
  15. Offline


    Woot! re-visited this! Just made it so all players on Endcraft get randomly coloured name tags! Keep up the good work :D
  16. Offline


    i am having a problem with this api. at first i thought it was the NameTags plugin but then i tried colorme and it happened again...
    Whenever someone is pvping and gets killed, when they respawn they have a green name(the &a one) and i cant change this... no matter what rank they are, they respawn with a green name and its very annoying, any reason why its happening?
  17. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    One of your plugins is telling TagAPI it wants to be green?
  18. Offline


    Im confused! Ok so I have:

    public void onNameTag(PlayerReceiveNameTagEvent event) {
    Player player = event.getNamedPlayer();
    event.setTag(ChatColor.RED + player.getDisplayName());

    and then I have:

    if(sender instanceof Player) {
    if (commandLabel.equalsIgnoreCase("nametagapi")) {


    So this should Refresh the nametag is I type /nametagapi? And then I see the player refresh but their name tag is still white!
  19. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    Handled over IRC
  20. Offline


    I did it :D Thanks guys <3
  21. Offline

    Bradley Hilton

    In the next release of CaptureThePoints it will be using this to color player name's based upon which team they are on.
  22. Offline


    Where would I put a code like this? Under what file or folder?
    The one that would change my name to red for everyone.
    1. @EventHandler
    2. public void onNameTag(PlayerReceiveNameTagEvent event) {
    3. if (event.getNamedPlayer().getName().equals("AppleMan88")) {
    4. event.setTag(ChatColor.RED + "AppleMan88");
  23. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    You'd put it in a class file that you then register the event for.
  24. Offline


    I don't quite understand since I'm a noob at this plugin stuff, where would the class file go and how do you make a class file?
  25. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

    Learn more about plugin development first :)
  26. Offline


    Alright, any recommendations on places to learn about this, or just search it up on YouTube? :p
  27. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı Retired Staff

  28. mbaxter Hey, I found a bug

    I wrote a plugin for killstreaks with the scoreboard(SIDEBAR), and it worked, then I wanted use your tagAPI, so I just made an event for it, but when I exported it, you tagAPI worked fine, but my scoreboard dissappeared. So it doesn't work for scoreboards(SIDEBAR-type).

Share This Page