Add Custom Skull to Creature

Discussion in 'Plugin Development' started by funkystudios, Mar 15, 2013.

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

    funkystudios

    I'm wondering how I would go about adding a skull/head with a specified username to the helmet slot of a creature such as a zombie or a skeleton.

    Thanks in advance!
     
  2. Offline

    TnT

    Moved to the correct forum.
     
  3. Well, first you need to build the itemstack... Material.SKULL_ITEM with data value of 3 then item.getItemMeta(), cast it to SkullMeta then set the owner.
    After that you need to check if the entity is instanceof LivingEntity and cast it to that then you can use getEquipament() and there you can set the helmet...
     
  4. Offline

    funkystudios

    Oops, thought I posted this in plugin development.

    Anyways, the data value of 3 was where I went wrong. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page