Is this possible?

Discussion in 'Spigot Plugin Development' started by Dragon_12dk, Apr 26, 2017.

  1. I am guessing that this is impossible, even though I think i saw a plugin do this somewhere. Just wanted verification.

    Is it possible for a plugin to change only part of a players skin? I know a plugin can change your whole skin, but can it do something like change only the body, head, or jacket, and nothing else? This was probably a mod I saw, because I believe this is impossible.
     
  2. Maybe the plugin could auto generate a skin with the half that is the players and the other half that is the half you want to add and set the player's skin to that.
     
  3. could probably merge skin images in your program (get the layered one + the player's one), get the image and use something like https://mineskin.org/ to create a finalized skin signature and textures for you.
     
  4. This is not possible without slight client modification. I've done some heavy research on stuff like this for a plugin/custom launcher that gives capes to anyone from a website, so here's why:

    When you connect to the server, your client sends the server a base64 encoded payload containing your skin URL, cape URL, and some other data like a timestamp, including a signature, signed by a yggdrasil certificate (I think .dar file) in the authlib file of the client (A library of minecraft made by mojang to handle authentication of users). The server receives this info, and sends it around to all the other players on the server in your GameProfile. Your client gets this data, and first checks the validity of the signature compared to the string. If the clients sees that the text was properly signed, then it parses and applies the skin. If the texture was not properly signed, you get an error in your client console somewhere along the lines of 'The payload has been tampered with'. To unlock such features you are asking for, you need to do some simple client modification, which if you can't I can send to you to check out, but unless you find a way to sign strings with the certificate, this is not currently possible.

    Anyway, I hope this gave you some insight on this, there's definitely more knowledgeable people than me with string signing, and could possibly be done if you are an experienced hacker, but I am not. (I am willing to explain in further detail any step of this if you're interested, by the way)

    EDIT: In case you were wondering, the way you can give someone another player's whole skin, is because the payload you get has already been signed, therefore the clients see no harm in it.

    Happy coding ~ RubbaBoy
     
  5. Yes, its possible i make a plugin with that base:

    https://www.spigotmc.org/resources/merryskins.33227/

    When a player join to the BungeeCord server it gets the skin from the Base64 Skin Properties/Skin url of the profile, then applies an pre loaded image and applied the skin to the player
     
  6. Huh, does that only work with BungeeCord servers? And how did you apply it, because as far as i know, the skin is just in a URL like this: http://textures.minecraft.net/texture/79df956cbd49c029db6f7212a5328e85a4d434e898c4cebfe9676e1e4e6e6
     
  7. No, it can work including SkinsRestorer or the system that uses

    In java you can Download images from Urls, loading local images and other things

    In my other plugin:

    https://www.spigotmc.org/resources/bungeenpc.35247/

    You can upload a .png skin file and apply it to the NPC's (Spigot level)
     
  8. That's pretty cool, but I'm not sure if I understand what you are modifying. Are you modifying The string directly from here, or the decoded
    "textures","value" from that string? Because the client checks the signature of the texture payload, unless I am missing something big.
    Are there any wiki links/resources that helped you make that plugin? I don't plan to steal your idea or anything, I'm just interested in how this works.
     
  9. I don't remember the exact order but you get the player profile, then you get the properties -> get "texture" field, it returns a Base64 String -> Decode it and get the "texture" field and "url" (?), then you get the skin url and now you can download and modify it
     
  10. Okay, one last question before I have to go to bed for tonight: What do you do with the modified image, do you replace the url in the textures with something new after uploading it? If you give me permission and say I can decompile it to see how it works, I might just purchase your MerrySkins plugin since it's only like $1
     
  11. amazing! so it is possible.
     
  12. You set a new gamerprofile for that player
     
  13. @Dragon_12dk So this is possible, as stated by MrMaurice211, if you use the tool https://mineskin.org/ to sign the skins by using alts and uploading new textures, then feeding back the signatures. I didn't think this was possible before, since I thought it was impossible to actually sign the textures :)