[Player Heads]

Discussion in 'Plugin Development' started by SugarCraft, Mar 6, 2013.

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


    Hey! I'm creating a plugin to make it so if you do /staff there's a bunch of player heads there, with the names of all the server staff. But, I'm having trouble adding it. I know how to add materials, though not player heads. Any help is appreciated.
  2. Offline


    It may have to do with editing the minecraft code, like spawning player npcs, but I'm not sure
  3. Offline


    Oh.. Ill go google that. Any other ideas?

    By the way, if I cant do that do you know how I can item names?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 31, 2016
  4. Offline


    SugarCraft Heads as in skulls (like wither skulls, zombie skulls, and creeper skulls)? You can do that:
    1. ItemStack skull = new ItemStack(Material.SKULL_ITEM);
    2. SkullMeta meta = (SkullMeta) skull.getItemMeta();
    3. meta.setOwner("chasechocolate");
    4. skull.setItemMeta(meta);
  5. Offline


    That just shows up as a skeleton skull.
  6. Offline


    Phasesaber change the name "chasechocolate" to your player name
  7. Offline


    Phasesaber Right now you're only using the SKULL_ITEM without setting a durability. That means that it's a Skeleton head, the durability for a player head is 3.
    ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
    That should work when you set the owner now.
  8. Offline


    Thanks! Works fine!
  9. Offline


    Phasesaber I only just realized that this thread is over 1 year old lol...
    Glad to help, though
  10. Offline


    I thought it said March of 2014.... :p
Thread Status:
Not open for further replies.

Share This Page