Tutorial [1.8] How to make custom player skulls.

Discussion in 'Resources' started by ZanctarianDevelopment, Apr 23, 2016.

Thread Status:
Not open for further replies.
  1. Hello, I am here to show you step by step on how to make custom player skulls.

    Code:
    ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3);
    A ItemStack is commonly used to get an item. The material defines the item. Make sure you click on SKULL_ITEM instead of SKULL or else the skull won't show. The '1' represents how many skulls are going to be added. Last, the '(byte) 3' defines what type of skull. Here is a list of bytes.

    0 = Skeleton Skull
    1 = Wither Skeleton Skull
    2 = Zombie Head
    3 = Head (Displayed as a Steve head as default)
    4 = Creeper Head

    Code:
    SkullMeta skullMeta = (SkullMeta) skull.getItemMeta();
    When it comes to meta, you never want to use a normal ItemMeta or it just won't work like you want it to. For skulls, use the SkullMeta (It is easier and dependable).

    Something you should know.

    SkullMeta basically has the same setup as ItemMeta but there is a certain something that proves the SkullMeta useful.

    Code:
    skullMeta.setOwner(String);
    That method is used to set the skin of the player head. Now, if you set owner without renaming the skull after, the skull will do: "(Player)'s Head", for the title. You should also set item meta on the bottom of all your customizing, here is the method:

    Code:
    skull.setItemMeta(skullMeta);
    Thank you for reading and I hope this helped for those of you that doesn't know how to do custom skulls!
     
  2. Offline

    CraftCreeper6

    @ZanctarianDevelopment
    I like how you explain, maybe you could add some screenshots to make it more appealing. :)
     
  3. Ok, it's is very early right now so I will do it in a little while @CraftCreeper6.
     
Thread Status:
Not open for further replies.

Share This Page