Solved How to set custom skull to GUI?

  • 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 comminuty!

    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!

Status
Not open for further replies.

_PAPER_PLANE_

Member
Jan 21, 2022
41
0
6
How to set custom skull to GUI? my code:

set slot 30 of {_menu} to player head with nbt "{SkullOwner:{Id:[I;1431745196,628508261,-1575314543,1244679121],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjkyZDk0YTVlZmNhOTRmODczOTk3M2I0NGEwMWJiYmRmNGEyYzBlMDVkYmI0NWU5NzM0MjA3NmM5NTBiNzNhNyJ9fX0=""}]}}}"

but it says: a slot can't be set to 'player head with nbt "{SkullOwner:{Id:...' because the latter is neither an item type nor an item stack
[doublepost=1669211104,1669131482][/doublepost]I have found another solution

set {customhead} to tool of {_p}

Just take the custom head and run the command to save the item in {customhead} to set the slot
 
I have seen this, but I don't really understand it.
I put the code in skript but there is an error message.
Does it need add-ons?
 
Yeah you need skbee to add the nbt but i dont know how to add nbt to a item in newer skbee versions.

Ok after time i found how you can do it. I hope that this should also do it for you.
Code:
function getheadbyuuid(uuid:text) :: item:
    set {_i} to player head
    set {_i}'s nbt to nbt compound from "{SkullOwner:{Id:""00000000-0000-0000-0000-000000"",Properties:{textures:[{Value:""%{_uuid}%""}]}}}"
    return {_i}
   
command /head:
    trigger:
        set {_textureid} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDgxMmVmYTU1MDNjZDIwMzkwNTUxMTQ4NDRhM2U4NDhjZTgxM2I3NzY4NTU3ZTBlMWM0OGRjOTk0MzNiNTY2NyJ9fX0="
        set {_i} to getheadbyuuid({_textureid})
        give {_i} named "Custom head :D" to player

Required addons:
SkBEEE: https://www.spigotmc.org/resources/75839
 
Status
Not open for further replies.