1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to set custom skull to GUI?

Discussion in 'Skript' started by _PAPER_PLANE_, Nov 22, 2022.

Thread Status:
Not open for further replies.
  1. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
    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
    --- Double Post Merged, Nov 23, 2022, Original Post Date: Nov 22, 2022 ---
    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
     
  2. _PAPER_PLANE_

    _PAPER_PLANE_ Member

    Joined:
    Jan 21, 2022
    Messages:
    16
    Likes Received:
    0
    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?
     
  3. Pierrelasse

    Pierrelasse Active Member

    Joined:
    Apr 20, 2022
    Messages:
    116
    Likes Received:
    4
    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 (Text):
    1. function getheadbyuuid(uuid:text) :: item:
    2.     set {_i} to player head
    3.     set {_i}'s nbt to nbt compound from "{SkullOwner:{Id:""00000000-0000-0000-0000-000000"",Properties:{textures:[{Value:""%{_uuid}%""}]}}}"
    4.     return {_i}
    5.    
    6. command /head:
    7.     trigger:
    8.         set {_textureid} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDgxMmVmYTU1MDNjZDIwMzkwNTUxMTQ4NDRhM2U4NDhjZTgxM2I3NzY4NTU3ZTBlMWM0OGRjOTk0MzNiNTY2NyJ9fX0="
    9.         set {_i} to getheadbyuuid({_textureid})
    10.         give {_i} named "Custom head :D" to player
    11.  
    Required addons:
    SkBEEE: https://www.spigotmc.org/resources/75839
     
Thread Status:
Not open for further replies.

Share This Page

Loading...