Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public static ItemStack createItem(boolean isSkull, int type, int data, int amount, Player player, String name, List<String> lore)
  2. {
  3. if(!isSkull)
  4. {
  5. ItemStack is = new ItemStack(type, amount, (short)data);
  6. ItemMeta im = is.getItemMeta();
  7. im.setDisplayName(color(name));
  8. if(lore!=null)im.setLore(lore);
  9. is.setItemMeta(im);
  10. return is;
  11. }
  12. ItemStack skull = new ItemStack(Material.SKULL_ITEM, amount, (short)3);
  13. SkullMeta m = (SkullMeta) skull.getItemMeta();
  14. m.setOwner(player.getName());
  15. if(lore != null)m.setLore(lore);
  16. m.setDisplayName(color(name));
  17. skull.setItemMeta(m);
  18. return skull;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement