setSkullTexture
fun ItemStack.setSkullTexture(texture: String? = null, uuid: UUID? = null, name: String? = null)(source)
Configures the minecraft:profile
item component to have the given texture. It can be provided via texture, uuid or name. If provided, the texture has to be base64 encoded.
You can find a lot of heads with the associated base64 values on minecraft-heads.com.
Possible ways of using this function are:
// base64 encoded texture json (this example is truncated)
skullStack.setSkullTexture(texture = "eyJ0ZXh0dXJlcyI6ey...")
// or
skullStack.setSkullTexture(uuid = uuid = UUID.fromString("069a79f4-44e9-4726-a5be-fca90e38aaf5"))
// or
skullStack.setSkullTexture(name = "Notch")
Content copied to clipboard
Beware that not setting the texture directly will result in an API call to Mojang.