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

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

Thread Status:
Not open for further replies.
  1. Does it also modifies the TAB list or only the floating text boxes above players?
     
  2. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    It is only for the name tag. Nothing else :)
     
  3. Does name tag mean the text box above the player?
     
  4. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Yes
     
  5. Offline

    Poppi

    Just need to be clear about this. In PlayerDeathEvent I want to make the killer take the name of the victim, do I use TagAPI.refreshPlayer(killer, victim.getName);?
     
  6. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    No. The refresh method will cause events to fire as appropriate. You need to store internally what the player's name should be now, and when the event fires you can change it as appropriate.
     
  7. Offline

    i4evercode

    Every time a player moves it makes them glitch and twirl as the player steve and then turns their skin back to normal when they stay still. :/ Any help would be appreciated.
     
  8. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Stop calling the refresh method on player move.
     
  9. Offline

    i4evercode

    Wow I'm a moron. I didn't realize I left the refresh there. Ok but now I am having another problem: when a player joins the server the second player that joins is seen as the color wanted but the first player is seen as regular having just a white name tag above his head instead of colored. I was wondering if you knew how to fix this. Any suggestions?
     
  10. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    you're handling the events wrong? Can't help with limited info.
     
  11. Offline

    i4evercode

    Oh sorry,
    This is what I have written for the event:
    @EventHandler
    public void onPlayerReceiveNameTagEvent(PlayerReceiveNameTagEvent event){
    Player player = event.getNamedPlayer();
    String playerTag = event.getNamedPlayer().getDisplayName();

    if(player instanceof Player){
    event.setTag(playerTag);
    }
    }

    Any ideas on what I am doing wrong?
     
  12. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    You aren't setting the displayname earlier than the event fires.
     
  13. Offline

    i4evercode

    How would I do that?

    Hey I figured it out. I was just doing some stuff wrong. Sorry. Thanks for your time! :)

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

    AmoebaMan

    I'll try updating, that's a very real possibility.
     
  15. Offline

    SugarCraft

    Hey! I'm a developer, and I am using nocheat for anti-hacking, and would it be possible if a player is suspected of hacking, the plugin makes there name tag black?
     
  16. Offline

    SniperFodder

    Yes, it is most defiantly possible.
     
  17. Offline

    SugarCraft

    Would you happen to know how to do so? Would I have to use Nocheats code?
     
  18. Offline

    ZeusAllMighty11

    Yes, you would have to hook into the Nocheat API.
     
  19. Offline

    chasechocolate

  20. Offline

    Poppi

    update to 1.5 pl0x
     
  21. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

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

    spencerbk765

    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!
     
  24. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

  25. Offline

    xpopy

    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? :)
     
  26. Offline

    finalblade1234

    How do i call the PlayerReceiveNameTag event?
     
  27. Offline

    Deseart27

    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 !
     
  28. Offline

    Blixion

    Any Commands for Renaming the NameTAG ? So the tag above my player, displays an other name ?
     
Thread Status:
Not open for further replies.

Share This Page