Here's a simply method to set an owner of any skull you got. I don't know exactly but it should work with every skull. Code:java // Command Stuff Block block = player.getBlockAt(); if (block.getType() == Material.SKULL) { CraftSkull skull = new CraftSkull(block); skull.setOwner(args[0]); // args[0] is a player's name -> /head <name> skull.update(); sender.sendMessage(ChatColor.GREEN + "You successfully changed the owner of this skull!"); }
It was added in the 1.4.6 API, so you need to be using the latest beta build in order to use it, the latest recommended build will not have it. To find other versions, go to dl.bukkit.org