Solved Suggestions for manipulation of player name tags

Discussion in 'Plugin Development' started by TheMintyMate, May 28, 2014.

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

    TheMintyMate

    I have had a look around the forums, and there has been a lack of explanations of how to change player name tags (change colour, add text, remove text....)
    So if anyone has any suggestions or code, it would be greatly appreciated.
    Thanks,
    - Minty
     
  2. Offline

    Aengo

    Konkz likes this.
  3. Offline

    Konkz

    Like Aengo posted, that will help you. Whereas it has its limitations, you can add a prefix and a suffix and that's it.

    Obviously, with these you can change the actual colour as you can add colour to prefix that will colour the rest but if you want to make it from "konkz" to "k0nk5" than you won't have a skin.
     
  4. Offline

    mine-care

    TheMintyMate Aengo Konkz
    Correct me if I'm wrong, but I think that scoreboard teams alow you to set the color of a player''s name tag.
     
  5. Offline

    Aengo

  6. Offline

    Konkz

    They allow you to add prefix. Imagine if that was a prefix and you've done
    ChatColor.RED + "Hi" it would say it in red, but the ChatColor.RED is prefix in name.

    NameTagEdit I think uses the scoreboards to create prefixes and suffixes.
     
  7. Offline

    TheMintyMate

    Aengo
    Konkz
    mine-care
    Thanks a lot guys for your help :)
    Just wondered though, how would you go about using the scoreboards within a Java Plugin?
    I have once attempted to just use "ChatColor" before to edit player name tags colour, but it only changed the colour of someone's name in the actual chat (which unsurprisingly tells me I probably didn't use it correctly for the editing of the player's name tag). In fact, can you even use "ChatColor" for the editing of a players name tag? The function suggests for the use of chat only.
    I'm now going to check out the top link :)
    Thanks again guys,
    - Minty
     
  8. Offline

    MOMOTHEREAL

    TheMintyMate It changed it in the chat because you used the player.setDisplayName("") method, which does change the name only in the chat.

    Docs here.
     
  9. Offline

    Konkz

    If you want to edit someones nametag above their name you'll have to do a lot of things therefore we suggested an API to you. With that you simply do few little things and done, but if you were to do it on your own as you (for some reason) don't want to use an API it will be best for you to look at what TagAPI and NameTagEdit have done.
     
  10. Offline

    TheMintyMate

    Ok, thanks guys,
    - Minty
     
Thread Status:
Not open for further replies.

Share This Page