Solved Skull Plugin

Discussion in 'Plugin Development' started by mydeblob, Apr 22, 2014.

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

    mydeblob

    Hi,
    With the 1.7.9 update how would won set the metadata of a skull? Would it be something like this?
    Code:java
    1. ItemStack i = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
    2. SkullMeta meta = (SkullMeta) i.getItemMeta();
    3. meta.setOwner(event.getEntity().getUniqueId().toString());
     
  2. Offline

    stink123456

    I think it still works with the name. Try reading about the minecraft skin database.
     
  3. Offline

    mydeblob

    stink123456
    I don't think they work. All head plugins seem to just display steve heads on 1.7.9. I believe this is because skins are now tracked via UUID's (I believe) so when a player changes his name his skin stays the sam.
    I will read about the skin database and let you know how things go.

    After looking into bukkit's source code, I believe they have not updated for this yet. The following code
    https://github.com/Bukkit/CraftBukk...craftbukkit/inventory/CraftMetaSkull.java#L91 (Line 91-103)
    Checks the playerData files with names, when it should be checking it with UUID's. So I believe this would classify as a bukkit bug.

    Sorry for triple post. Just wanted to let you guys know that this bug has been fixed. They have added a fix for it in the test branch so it isn't publicly available for download yet. You can see the commit here
    https://github.com/Bukkit/CraftBukkit/commit/e027d69be8349978ffcc16d240d3141a981ea791

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page