Solved Change a player's nametag AND skin

Discussion in 'Spigot Plugin Development' started by Cloth, Jun 4, 2017.

  1. Hello. I'm currently coding a plugin using TagAPI but it only changes their nametag and not their skin. Does anyone know how I can get around this?

    Before you recommend other API's, I'm trying to stick with TagAPI because the person I'm coding the plugin for already uses that API for some of his other plugins.

    Thanks!
     
  2. Why use an API? It's fairly simple to set a name. player.setCustomName("Name");
    And for the skin I don't know because I never tried to do something for that. And btw I nevered used TagAPI but by the name of it I'm assuming it isnt for skins but name, could be wrong though.
     
    • Agree Agree x 1
    • Optimistic Optimistic x 1
  3. I'm sorry but you can't change skins with TagAPI.
    https://www.spigotmc.org/resources/nicknamer-integrated-api.5341/
    This nickname plugin also has an API integrated which allows you to handle the skins and Nicknames seperate.

    If you really don't want to use any other API you have to look in NMS.
    Use https://www.spigotmc.org/resources/api-packetlistenerapi.2930/ as API for packets.

    It's better to use an API if you don't want to mess with Packets.
     
  4. As DizMizzer said you either need to modify packets being sent via an API like he linked or you have to bootstrap your own system which is way more painful.

    You could always just send a packet to overwrite the original skin blob that was sent too, but once again all annoying stuff and tread with caution. Sadly all of this stuff is locked up in a library that is just bundled with the server jar and you can't really easily change yourself.
     
  5. That won't change his nameTag that the OP is talking about. I advice you not to give advice if you don't know what methods do :).

    To the OP, you should use packets to modify the nameTag. I found this little thing;

    https://github.com/Alvin-LB/NameTag.../bringholm/nametagchanger/NameTagChanger.java
     
  6. Thanks for your suggestions guys! I solved the problem by combining TagAPI with a plugin called ChangeSkin.

    Marking this thread as solved.