[skript-mirror] Player heads with textures

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

Dovias

New Member
Dec 8, 2019
6
1
0
26
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:
import:
  org.bukkit.Material
  org.bukkit.inventory.ItemStack
  org.bukkit.SkullType
  com.destroystokyo.paper.profile.ProfileProperty
  java.util.UUID
  org.bukkit.Bukkit

expression [%integer%] textured player head[s] with value %string%:
  return type: Item
  get:
    if expression-1 is set:
      set {_skull} to new ItemStack(Material.SKULL_ITEM and expression-1 and SkullType.PLAYER.ordinal())
    else:
      set {_skull} to new ItemStack(Material.SKULL_ITEM and 1 and SkullType.PLAYER.ordinal())
    set {_skullmeta} to {_skull}.getItemMeta()
    set {_UUID} to UUID.randomUUID()
    set {_playerprofile} to Bukkit.getServer().createProfile({_UUID})
    {_playerprofile}.setProperty(new ProfileProperty("textures" and "%expression-2%"))
    {_skullmeta}.setPlayerProfile({_playerprofile})
    {_skull}.setItemMeta({_skullmeta})
    return {_skull}

Examples:

Code:
command /example:
  trigger:
    give 5 textured player heads with value "texture value of player head." to event-player
    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"

Requires:
  • 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.)
 
Amazing! Thank you so much for this resource, I used it to get HD Airpods and many other skulls! Once again, thanks a bunch!