Get custom head as Material?

Discussion in 'Plugin Development' started by victorsaksulho, Jun 1, 2020.

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

    victorsaksulho

  2. By custom head i assume you mean a player head, which is easy to do.
    Code:
    ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
                        SkullMeta meta = (SkullMeta) Bukkit.getItemFactory().getItemMeta(Material.SKULL_ITEM);
                        meta.setOwner("Playername");
                        skull.setItemMeta(meta);
     
  3. Offline

    KarimAKL

    @Callum | NorthernH They're asking for setting a block, not getting an item.

    @victorsaksulho Here you go: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Skull.html
     
Thread Status:
Not open for further replies.

Share This Page