Head of Player

Discussion in 'Plugin Development' started by Mathie, Feb 14, 2016.

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

    Mathie

    Hello,

    I try to create a head of a player with this code:

    Code:
               ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short)3);
                        SkullMeta getMeta = (SkullMeta)skull.getItemMeta();
                        getMeta.setDisplayName(p.getName());
                        getMeta.setOwner(p.getName());
                        skull.setItemMeta(getMeta);
                        inv.addItem(skull);
    The problem is that the head takes the default skin, not my skin:

    [​IMG]

    Thanks :)
     
  2. Offline

    Zombie_Striker

    @Mathie
    If you are using a 1.8+ server, you need to place the head somewhere in the world for the skin to load. This has been a well documented issue.
     
  3. Offline

    mcdorli

    Please, use google, this was mentioned here many many times.
     
  4. Offline

    87pen

Thread Status:
Not open for further replies.

Share This Page