setSkullPlayer

fun ItemStack.setSkullPlayer(player: ServerPlayer)(source)

Configures the minecraft:profile item component to represent the given player (specified via uuid in its game profile).

The internal name can be anything, but it should match the actual player name.

skullStack.setSkullPlayer(server.playerList.getPlayerByName("Notch"))