Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Permanent Skins Not Loading Updated Skin

Open ArctoranDev opened this issue 9 years ago • 29 comments

So after following the tutorial on the Wiki to set skins on my NPCs by setting it on my skin and than using the /npc skin -p command to set the skin, on the Wiki it says to change your skin and repeat the process but when I change my skin to change the skin of another NPC it loads the skin from the one before and not the new one.

For example: I have NPC A & NPC B and Skin A and Skin B, I load Skin A onto NPC A and make it permanent but when I try to set my skin as Skin B to update NPC B it loads Skin A even though I've already changed my skin to Skin B.

ArctoranDev avatar Jan 01 '17 17:01 ArctoranDev

What version of Minecraft and Citizens?

mcmonkey4eva avatar Jan 01 '17 18:01 mcmonkey4eva

I'm using Citizens 2.0.21 and Spigot 1.10.2

ArctoranDev avatar Jan 03 '17 01:01 ArctoranDev

Even now after a certain amount of time the Skins completely disappear and reset to the default ones or if I use the /citizens reload command it resets them to default. Can you make the plugin save the skin images server side or something and load them on startup or reload?

ArctoranDev avatar Jan 03 '17 01:01 ArctoranDev

Think I found the problem, Citizens doesn't grab the most recent Skin unless the plugin is reloaded but then it updates to the newest skin so in order to set multiple skins on one account I would need to keep reloading the plugin but when I do it resets the skin to default and then would download the newest skin instead. Essentially your only way to solve all the skin problems is to save them server-side and load them from say in the Citizens folder.

ArctoranDev avatar Jan 03 '17 01:01 ArctoranDev

Can confirm this exists w/ Citizens 2.0.21 and spigot 1.11 as well. To actually get it to register that you changed your skin you must either restart the server or save and reload the citizens plugin (which for me often duplicates all my recent npcs with ghost npcs).

Ditronian avatar Jan 04 '17 04:01 Ditronian

This has been an issue for so long with settings skins but since mcmonkey4eva isn't going to be allowing the saving and loading of server-side skins I've hired a developer to make me a modified version of Citizens so I can save and load the skins from the server.

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

@Arctomium It's not that I "won't be allowing" it... it's that it's impossible under Mojang's system. There's not a way to do that. I hope you haven't paid whatever developer claimed they could do that.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

@mcmonkey4eva well then find a way so we can actually set custom skins and make them permanent, because currently you can't change your skin and set it to permanent on another NPC unless you reload the server or the plugin but that just makes the skin on the first NPC disappear.

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

There are bugs, yes, but they're being worked on... IE that's what these issues are for.

But it should be as easy as /npc skin <name> -p

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

Also I don't see how it's impossible if you're loading skins even the permanent ones from Mojang as they just send the data of the skin images so why can't they be loaded from file instead since that's essentially what you're doing with Mojang except you'll be changing what server it's receiving the skin from.

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

@mcmonkey4eva JESUS CHRIST CAN YOU NOT READ??? I've already said that the command like you just said does not work! It sets the same skin on every NPC...

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

But it should be as easy as /npc skin -p

The -p attribute works fine for us, and permanently sets multiple skins, albeit after restarting the server/reloading citizens after each skin.

Ditronian avatar Jan 06 '17 23:01 Ditronian

Mojang encrypts skin data. We can't load from regular image files without matching the encryption somehow.

All we store in "permanent" mode is a reference to Mojang's skin server, which stores old-versions of skins.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

Read my example of what is happening again: For example: I have NPC A & NPC B and Skin A and Skin B, I load Skin A onto NPC A and make it permanent but when I try to set my skin as Skin B to update NPC B it loads Skin A even though I've already changed my skin to Skin B.

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

@Arctomium As I said: there are bugs, which are being worked on. Also, please maintain some professionalism in public issue postings.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

Also, albeit after restarting the server/reloading citizens after each skin seems to be the working solution at the moment until we've gotten the caching issues cleaned up in Citizens.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

Yes but I've seen people having this problem and bug for most of the time Citizens has been around, so does Mojang only store 1 previous skin?

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

Citizens has been around for many many years, the skin server update happened in minecraft version 1.7.6. Prior to that it was impossible to set a skin to anything other than the latest skin file (The skin was read from the player's username clientside, followed by a call to the Mojang servers). Mojang stores all previous skins I do believe - the issue you're experiencing is a caching flaw somewhere in the server data, thus why restarting the server causes the skin changes to start working.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva

Okay then so what is your solution to fix this problem?

ArctoranDev avatar Jan 06 '17 23:01 ArctoranDev

A: Restart your server when you need to apply a new skin. B: Await a code-side resolution to the caching flaw.

mcmonkey4eva avatar Jan 06 '17 23:01 mcmonkey4eva