How to Set a Player's Skin from a Mojang Username
Using the Command
To give a skin to yourself or another player using a real Mojang account, run /skin set mojang <username> [<targets>]. The <username> is the Minecraft account whose skin you want to copy. The optional [<targets>] argument lets you apply that skin to one or more other players instead of yourself. If you omit targets, the skin applies to whoever ran the command.
For example, to pull a skin onto yourself, type the command with just the username. To apply it to someone else, add their name as the target. You need permission to target other players, which is handled through the mod's permissions API.
What Happens Next
Skin Restorer contacts Mojang's skin servers and downloads the texture for that username, then applies it to the target player. The player does not need to relog for the change to appear in most cases, but if the skin looks stale, having them reconnect forces a refresh.
This works even on servers running in offline/insecure mode, which is the main reason the mod exists. Because offline servers cannot verify accounts, the mod fetches the skin by name and pushes it to clients directly. If the username does not exist or has no skin set, the command will fail, so double-check spelling before running it.