ChangeSkin [v3.0] for Sponge 7 - Custom skins

ChangeSkin

Description

This plugin allows your players to change their skins by command. These skins have to be downloaded from Mojang, because Minecraft clients only accept from Mojang signed skins. But you can choose every skin that another Minecraft user currently has.

Moreover it will be possible to set a custom standard skin. If you want to, this plugin can set this standard skin for
all players who still have the default steve or alex skin.

Download

https://www.spigotmc.org/resources/changeskin.21469/

If you like the project, leave a star on Github and contribute there.

ChangeSkin

Dev builds

https://ci.codemc.org/view/Games647/job/ChangeSkin/

Changelog

Features

  • Skins for offline mode
  • Upload custom skins (using the skin upload command)
  • BungeeCord and Sponge support
  • SQL-Storage
  • Change your skin - Every skin which has ever uploaded to Mojang is allowed
  • Lightweight
  • Easy to use
  • Implemented cache to benefit performance
  • Nearly no mojang rate limits due caching
  • No client modification needed
  • Possibility to create a standard skin

Commands

  • /setskin < uuid > [keep] - Sets your skin to be equal to the player with the selected uuid
  • /setskin < playerName> [keep]
  • /setskin < onlinePlayer > < newSkinUUID/newSkinPlayerName > [keep]
  • /skinupdate [onlinePlayer] - Invalidates the database entry and fetches the fresh skin from the Mojang servers
  • /skinupload < url > Upload a skin to a mojang account
  • /skinselect < name > Choose a skin from the database which has a specified name
  • /setskull Changes the skin of a holding skull from the database which has a specified name

Permissions

  • changeskin.command.skinupdate - Command to refresh the own skin
  • changeskin.command.skinupdate.other.uuid - Allowed to update the skin of that specific user
  • changeskin.command.skinupdate.other.* - Allowed to update all other skins
  • changeskin.command.setskin.* - All the commands below
  • changeskin.command.setskin - Set your own skin
  • changeskin.command.setskin.other - Set the skin of other players
  • changeskin.command.skinselect - Select a skin from the database
  • changeskin.command.skinupload - Upload a skin to one of the configured accounts
  • changeskin.command.skinskull - Use the skull command

Whitelist and blacklist permissions

Whitelist

  • changeskin.skin.whitelist.uuid - Allow this specific skin
  • changeskin.skin.whitelist.* - allows all skins

Blacklist

  • changeskin.skin.whitelist.*
  • -changeskin.skin.whitelist.uuid

=> This means all skins are allowed except the ones with the uuid in the blacklist list

Upload a skin to the database

  1. Put a Minecraft account into the config
  2. Check the logs if it’s authenticated correctly (ChangeSkin startup).
  3. /skin-upload < url > example: https://i.imgur.com/4lV1m26.png
  4. Now you see the skin id it’s saved as
  5. /skin-select 3 or /skin-select skin-3

How to install on BungeeCord

  1. Install the plugin on both BungeeCord and Bukkit server
  2. Activate BungeeCord support in your spigot configuration
  3. Check the settings of the ChangeSkin config in the BungeeCord instance
    • For example BungeeCord doesn’t support SQLite by default
4 Likes

Thanks to @Gershon for testing.

This plugin is targeting API 5.X, but 4.X works too if you disable instant updates, because of the vanish property.

Moreover the instant update doesn’t work completely, because it requires packet manipulation. Other players will see the new skin, but you cannot until you respawned.

Maybe you could fix this by teleporting the player to another world and back.

Good idea. That really works. Thank you.

Does this change the skin on the players profile? Or is this basically custom skins for servers?

I would love to be able to give people uniforms for RP reasons in game, or for teams etc.

1 Like

It changes the complete minecraft skin to a different one. Including head, cape, body, … There is no way to change only certain parts. So you can change only your full skin without going to minecraft.net and upload a new one.

it might be a better solution for teams to use colored leather clothes as this only affects the body.

I uploaded a new version where this is added. Works great so far.

1 Like

As said by @ryantheleach, this would be nice to have uniforms, colors, etc. We can only add a minecraft.net skin, Does any of you know a nice “skin finder” with mc.net url ?

Basically, I want to find a player with a wizard skin so I use the finder then I use ChangeSkin and voila here is my player with a wizard skin.

I think you misunderstood.

By making uniforms etc I mean using image manipulation to take the players current skin, modify it, then give it back to them.

What I was asking is, what are the restrictions on what skins you can pick?

Can it be arbitrary image data?
Does the image data need to be signed by Mojang? (fixable by uploading changed skin to a different account, using a pool of accounts)
Does the username of the skin need to match the player displaying the skin?

Does it need to be the live skin of the player, e.g. changing the actual players skin on minecraft.net using some sort of auth, or using another players (current) skin on minecraft.net

ChangeSkin only needs to know the minecraft username and uuid.

I found the following sites:

https://namemc.com/skins/trending

Yes it have to be signed by Mojang, but we can request any skin that is currently used by a player using the uuid.

Yes it’s also possible to use old skins, but the skin have to be downloaded at the time the skin was used by a player.

As far as I know no skins are deleted by Mojang, but there is no way to get the signature after someone changed it. So once downloaded we can use it forever.

Moreover Mojang added a API to upload skins. So it could be possible to let the plugin upload new skins to Mojang. Downloaded the new signed skin and then revert it. This is what a lot of minecraft heads websites did.

No you can choose any skin. For example I as games647 can choose a Notch skin.

1 Like

This looks awesome. I have a question though, does this change your skin permanently? as if you did it on the minecraft website, OR does it reset to normal when you relog? If it’s the former, it would be nice to have a reset command to go back to your original skin.

Yes it keeps the skin and you can reset it using your own uuid or /setskin reset

1 Like

I believe games means that it remembers it on the current server, not that it changes it on minecraft.net But I could be wrong.

2 Likes

Thanks for these links but I cannot get the name of the player if I find a nice skin.
Here is an archer http://mcskinsearch.com/skin/Archer :smile:

With Mojang API, could it be possible to upload a skin to my account e.g “blue team skin”, applying to some players, changing my skin to “red team skin” and applying to other players ?

yes that’s possible.

1 Like

That sounds really tricky but interesting ! I need to focus on it, this might give some fun for RPG side :slight_smile:

I’m currently working on the upload skin thing and I found out that the access token for uploading the skin is bound to the ip-address where it was generated.

In theory I only need the owner uuid, the access token and the url of the skin mojang should download. The access token can be retrieved from Mojang after an successfull authentication as an replacement for the actual password.

So I thought that you only need to put the uuid and the access token into the config. This means that the password of accounts isn’t stored on the server. But it looks like it doesn’t work, because the authentication has to come from the ip-address of the server. :frowning:

Link to a similar Spigot post: https://www.spigotmc.org/threads/changeskin.138380/page-15#post-1736265

Yes its doable, however for more players you will need more accounts to balance the load. There is a limit on mojang side, which wont let you change skin more than few times in a minute.

During my tests the limit was set to one upload per minute per account. (because of rate-limiting for downloading the skin)

But I don’t think this will be a big problem, because you won’t upload the skins so often. Once they are downloaded, they can be used forever.

1 Like

Admin just need to save some time in order to upload all of his skins and then apply to teams.

However, how can we chose which skin to apply ?