How can I change name tag with keep skin?

Discussion in 'Plugin Development' started by sjlee733, Feb 2, 2016.

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

    sjlee733

    I was using tag API but it changed skin!

    How can I change name tag with keep skin?
     
  2. Offline

    boomboompower

    @sjlee733
    Please be more descriptive
    • What are you trying to do
    • What problems are you facing
    • What is the api you are using?
     
  3. Offline

    sjlee733

    @boomboompower

    1. I changed player's name tag with tag API
    2. but it changed player's skin however I don't want change skin So, I want how to change name tag with keep skin
    3. I don't use any API
     
  4. Offline

    Konato_K

    @sjlee733 In 1.7 and earlier versions this isn't possible, skins are handled client side

    From what I know this is technically possible in 1.8, I have never done it before, but as far I know you modify the packets for spawning a player and change the name and skin there, I believe a fork of iTag on github did something like that.
     
  5. Offline

    teej107

    @Konato_K I thought the versions were the other way around which is why TagAPI stopped receiving updates.
     
  6. Offline

    WinX64

    Since 1.7, the skins have been handled by the server itself, so, it should be possible in both versions.

    If you're using anythng below 1.7.6, you're out of luck. The client downloads the skin automatically from the skin servers based on the name it received from the server, you have no control over it.

    In 1.7.6 to 1.8, the server sends the player's skin data along with the player spawn packet. It's far easier on this version, as you only need to intercept the spawn packet and modify the player's name, you don't need to touch the skin properties at all. You can pretty much do all this with ProtocooLib alone.

    In 1.8 and above, the server sends the player's skin data along with the player list item packet. It is stored on your client and used whenever an entity with the same UUID is spawned. It's relatively harder to do it in this version, as you have no control of the name or skin properties when directly spawning the player, you have to send this data when adding the player to the tab list. As you probably guessed by now, it will affect the name and skin's head on the tab list as well. There's a way however, to spawn the player and remove it's entry from the tab list. I have never tried to do this, but there's nothing that some research won't find.

    EDIT: Completely missed that, thanks
     
    Last edited: Feb 2, 2016
  7. Offline

    Konato_K

    @teej107 1.8 made name changing more complicated than it used to be, but it's still possible, mbaxter stopped updating TagAPI, but it's still possible to do it in 1.8, iTag is a replacement for TagAPI that basically does the same as TagAPI, I remember seeing a fork of it that also allowed to change the skin.

    1.7.6+, 1.7.5 and earlier are still handled by the client
     
    WinX64 likes this.
  8. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I updated TagAPI to all versions of CraftBukkit as they were released. :)
     
Thread Status:
Not open for further replies.

Share This Page