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!

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

[skript-mirror] Player heads with textures

Discussion in 'Snippets' started by Dovias, Jan 24, 2020.

  1. Dovias

    Dovias New Member

    Dec 8, 2019
    Likes Received:
    Wanna get textured player heads without using SkNBeet addon?
    No problem! You can do so using this expression, that i've made up for myself!

    Code (Text):
    1. import:
    2.   org.bukkit.Material
    3.   org.bukkit.inventory.ItemStack
    4.   org.bukkit.SkullType
    5.   com.destroystokyo.paper.profile.ProfileProperty
    6.   java.util.UUID
    7.   org.bukkit.Bukkit
    9. expression [%integer%] textured player head[s] with value %string%:
    10.   return type: Item
    11.   get:
    12.     if expression-1 is set:
    13.       set {_skull} to new ItemStack(Material.SKULL_ITEM and expression-1 and SkullType.PLAYER.ordinal())
    14.     else:
    15.       set {_skull} to new ItemStack(Material.SKULL_ITEM and 1 and SkullType.PLAYER.ordinal())
    16.     set {_skullmeta} to {_skull}.getItemMeta()
    17.     set {_UUID} to UUID.randomUUID()
    18.     set {_playerprofile} to Bukkit.getServer().createProfile({_UUID})
    19.     {_playerprofile}.setProperty(new ProfileProperty("textures" and "%expression-2%"))
    20.     {_skullmeta}.setPlayerProfile({_playerprofile})
    21.     {_skull}.setItemMeta({_skullmeta})
    22.     return {_skull}

    Code (Text):
    1. command /example:
    2.   trigger:
    3.     give 5 textured player heads with value "texture value of player head." to event-player
    4.     set slot 0 of expression-1's current inventory to textured player head with value "texture value of player head." named "Your display name of item" with lore "Your lore"
    • Skript-mirror
    • PaperSpigot (You could do this in spigot too, but it would require some NMS stuff, which im too lazy to do, because i'm always using paper.)
  2. Goose


    Nov 23, 2019
    Likes Received:
    Amazing! Thank you so much for this resource, I used it to get HD Airpods and many other skulls! Once again, thanks a bunch!

Share This Page