Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. ItemStack itemstack;
  2. ItemStack headitemstack;
  3. List<String> lore;
  4. Material material;
  5. String name;
  6. String skullowner;
  7. Integer amount;
  8. short id;
  9.  
  10. public ItemBuilder(Material material, short id, Integer amount, String name, String skullowner) {
  11. this.material = material;
  12. this.id = id;
  13. this.amount = amount;
  14. this.name = name;
  15. if (skullowner != null) {
  16. this.skullowner = skullowner;
  17. }
  18. }
  19.  
  20. public ItemStack getHeaditemstack() {
  21. itemstack = new ItemStack(getMaterial(), getAmount(), getId());
  22. SkullMeta itemMeta = (SkullMeta) itemstack.getItemMeta();
  23. itemMeta.setLore(lore);
  24. itemMeta.setDisplayName(getName());
  25. itemMeta.setOwner(getSkullowner());
  26. itemstack.setItemMeta(itemMeta);
  27. return itemstack;
  28. }
  29.  
  30. public String getSkullowner() {
  31. return skullowner;
  32. }
  33.  
  34. public ItemStack getItemStack() {
  35. itemstack = new ItemStack(getMaterial(), getAmount(), getId());
  36. ItemMeta itemMeta = itemstack.getItemMeta();
  37. itemMeta.setLore(lore);
  38. itemMeta.setDisplayName(getName());
  39. itemstack.setItemMeta(itemMeta);
  40. return itemstack;
  41. }
  42.  
  43. public Material getMaterial() {
  44. return material;
  45. }
  46.  
  47. public List<String> getLore() {
  48. return lore;
  49. }
  50.  
  51. public void addLore(String lore) {
  52. this.lore.add(lore);
  53. }
  54.  
  55. public String getName() {
  56. return name;
  57. }
  58.  
  59. public Integer getAmount() {
  60. return amount;
  61. }
  62.  
  63. public short getId() {
  64. return id;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement