Player heads

Discussion in 'Plugin Development' started by avatarDr, Jan 7, 2013.

  1. Offline

    avatarDr

    How to make head with player's name?
    Both SkullMeta.setOwner() and SkullMeta.setDisplayName() give no result.

    As I understand, there should be way to even make heads with skin of player.
     
  2. Offline

    Terradominik

    i never tried it, but i think it simply is skull.setOwner("Name"); (from Skull not from SkullMeta)
     
  3. Offline

    avatarDr

    Skull is the interface of block, not item.
     
  4. Offline

    avatarDr

    Well, how to change name of any item?
    I use .setDisplayName(), but the debug at next string shows that itemStack does not have displayed name.
     
  5. in a few steps:
    • get the ItemMeta (.getItemMeta())
    • set the DisplayName on that ItemMeta
    • set the ItemMeta on the stack (.setItemMeta(ItemMeta))
    Same accounts for SkullMeta, you have to set the ItemMeta again
     

Share This Page