Problems with adding player heads to guis

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

yv2

New Member
Jan 29, 2025
9
0
1
I literally have no idea how to add custom player heads to guis. I have been researching and looking all over the internet for 8+ hours. I have tried using skbee and the nbt tag of a skull. If someone could help me or tell me how to do it it would be greatly appreciated.
 
use something like that:

Code:
set compound tag "profile" of nbt of {crateitems::votecrate} to nbt compound from "{id:[I;2080793942,-524468218,-1541115779,1949756395],properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDk5MmU0YThmNDNjNzdhYzJlMmQ3OTJkOTYwNGY2MWYzNDM4N2M4NzdhYmEzNzEyZTQwNDdiNzQwYzU3OCJ9fX0=""}]}"

custom head nbts are changed in 1.20.5+.

you have to get profile compound nbt of your custom head and set the tag for your custom head in skript.

example:

/setblock ~ ~1 ~ minecraft:emoji_stuck_out_tongue:layer_head[rotation=0]{custom_name:'{"text":"Azalea Glare","color":"gold","underlined":true,"bold":true,"italic":false}',profile:{id:[I;-561362297,-1337376245,-1395416365,-1131497113],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWJmNTk2NDYzNTg3MTU5M2NjZTE3MDQ5YTU2ZjBjN2ZlMzllMGU0ODUxY2VmNjYxY2QxY2MzMjNiMzQyNjgxYiJ9fX0="}]} }

i found this in minecraft-heads. You need the text which i made bold. When you find it and get it, remove "profile:" and replace in the code i gave.
 
  • Like
Reactions: yv2
You have to change nbt compound tag "profile" to achieve a custom head.

Like this:
set compound tag "profile" of nbt of event-item to nbt compound from "{id:[I;2080793942,-524468218,-1541115779,1949756395],properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDk5MmU0YThmNDNjNzdhYzJlMmQ3OTJkOTYwNGY2MWYzNDM4N2M4NzdhYmEzNzEyZTQwNDdiNzQwYzU3OCJ9fX0=""}]}"
 
  • Like
Reactions: yv2
so how would I make it appear in like a chest gui or something?

this is my code so far:

on inventory click:
if event-item is oak sapling named "&6Item Recipes" with lore "&7Custom crafting recipes":
set {_inv2} to chest inventory with 1 row named "Recipes"
open {_inv2} to player
set compound tag "profile" of nbt of {_item} to nbt compound from "{id:[I;-495847147,1894401336,-2076282148,-1136365010],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTMxMzVlYTMxYmMxNWJlMTM0NjJiZjEwZTkxMmExNDBlNWE3ZDY4ZWY0YmQyNmUzZDc1MDU1OWQ1MDJiZjk1In19fQ=="}]}}"
set slot 0 of {_inv2} to string
set slot 1 of {_inv2} to bundle
set slot 2 of {_inv2} to cooked mutton
set slot 3 of {_inv2} to enchanted golden apple
set slot 4 of {_inv2} to {_item}
set slot 5 of {_inv2} to {_item2}

what do I have to do to chance it toa make it work
 
so how would I make it appear in like a chest gui or something?

this is my code so far:

on inventory click:
if event-item is oak sapling named "&6Item Recipes" with lore "&7Custom crafting recipes":
set {_inv2} to chest inventory with 1 row named "Recipes"
open {_inv2} to player
set compound tag "profile" of nbt of {_item} to nbt compound from "{id:[I;-495847147,1894401336,-2076282148,-1136365010],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTMxMzVlYTMxYmMxNWJlMTM0NjJiZjEwZTkxMmExNDBlNWE3ZDY4ZWY0YmQyNmUzZDc1MDU1OWQ1MDJiZjk1In19fQ=="}]}}"
set slot 0 of {_inv2} to string
set slot 1 of {_inv2} to bundle
set slot 2 of {_inv2} to cooked mutton
set slot 3 of {_inv2} to enchanted golden apple
set slot 4 of {_inv2} to {_item}
set slot 5 of {_inv2} to {_item2}

what do I have to do to chance it toa make it work

You have 1 "}" extra in ur nbt compound.
 
  • Like
Reactions: yv2
I deleted the exta } in the compound but I still get this error:
1738212202159.png
 
And you have to double your quotes which are in a quote.

Like;
"I am a string and ""hi!"".". this will send:
I am a string and "hi!".

Simply, you have to double them to make skript understand.
 
  • Like
Reactions: yv2
that worked perfectly, the only problem is that the head doesnt actually show up in the gui
this is the code:
1738212603121.png
 
I made a command to give myself the item and it gave me nothing. Do I need to like apply the nbt to a player head? And if so how would I do that
 
OMG IT WORKS TYSM I LOVE YOU IVE BEEN TRYING TO GET THIS FOR LIKE 2 DAYS THANK YOU SO MUCH