My skin isn't loading [closed]

My pals and I play on a "server" via Hamachi, because they don't want to buy MC (I have an account)

My skin appears correctly when I play singleplayer but the moment I connect to the "server" my skin becomes Alex, but one of my pals has a working skin active. How come mine isnt working?

Things I've tried:

  • I checked the homepage, skin is loaded there, same goes for the launcher
  • Restarted the game and waited about 3 minutes to let it load.

In order to play with people that don't have an official copy of Minecraft you need to turn off the online mode in server.properties file. But you also break the connection between Microsoft servers and your server by doing that. So your server becomes unable to download skin files from Microsoft servers. In order to fix that you can install spigot server instead of a vanilla server and install a plugin called SkinsRestorer.