Heads Don't Render (CraftBukkit 1.9)

Discussion in 'Plugin Development' started by MaxNatural, Jun 25, 2016.

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

    MaxNatural

    I am trying to get a player head and I use the code below, the player head is there but the skin does not render in the inventory or on the players head. It is on online-mode.

    Code:
                ItemStack mSkull = new ItemStack(Material.SKULL_ITEM, 1, (byte) SkullType.PLAYER.ordinal());
                SkullMeta msMeta = (SkullMeta) mSkull.getItemMeta();
                msMeta.setDisplayName(ChatColor.GREEN + "" + ChatColor.BOLD + "Macks' Head");
                msMeta.setOwner("Macks");
                List<String> msLore = new ArrayList<String>();
                msLore.add(ChatColor.GRAY + "" + ChatColor.ITALIC + "wat");
                msMeta.setLore(msLore);
                mSkull.setItemMeta(msMeta);
    
     
  2. Offline

    Zombie_Striker

    @MaxNatural
    All updates past 1.7+ have this issue. You need to place the head as a block somewhere in the world for the skin to load. I would recommend storing getting a block at y=250 over the player's location, setting that block to the player's head, and then setting it back to air after 1 tick.
     
    bennie3211 likes this.
Thread Status:
Not open for further replies.

Share This Page