Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ItemStack itemstack;
- ItemStack headitemstack;
- List<String> lore;
- Material material;
- String name;
- String skullowner;
- Integer amount;
- short id;
- public ItemBuilder(Material material, short id, Integer amount, String name, String skullowner) {
- this.material = material;
- this.id = id;
- this.amount = amount;
- this.name = name;
- if (skullowner != null) {
- this.skullowner = skullowner;
- }
- }
- public ItemStack getHeaditemstack() {
- itemstack = new ItemStack(getMaterial(), getAmount(), getId());
- SkullMeta itemMeta = (SkullMeta) itemstack.getItemMeta();
- itemMeta.setLore(lore);
- itemMeta.setDisplayName(getName());
- itemMeta.setOwner(getSkullowner());
- itemstack.setItemMeta(itemMeta);
- return itemstack;
- }
- public String getSkullowner() {
- return skullowner;
- }
- public ItemStack getItemStack() {
- itemstack = new ItemStack(getMaterial(), getAmount(), getId());
- ItemMeta itemMeta = itemstack.getItemMeta();
- itemMeta.setLore(lore);
- itemMeta.setDisplayName(getName());
- itemstack.setItemMeta(itemMeta);
- return itemstack;
- }
- public Material getMaterial() {
- return material;
- }
- public List<String> getLore() {
- return lore;
- }
- public void addLore(String lore) {
- this.lore.add(lore);
- }
- public String getName() {
- return name;
- }
- public Integer getAmount() {
- return amount;
- }
- public short getId() {
- return id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement