Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.EntenPlayz.APIs;
- import org.bukkit.Material;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- import org.bukkit.inventory.meta.SkullMeta;
- public class ItemAPI
- {
- ItemMeta itemMeta;
- ItemStack itemStack;
- SkullMeta skullMeta;
- public ItemAPI(String display, Material material, byte subid, int amount)
- {
- this.itemStack = new ItemStack(material, amount, (short)subid);
- this.itemMeta = this.itemStack.getItemMeta();
- this.itemMeta.setDisplayName(display);
- }
- public ItemAPI(String display, byte id, byte subid, int amount)
- {
- this.itemStack = new ItemStack(id, amount, (short)subid);
- this.itemMeta = this.itemStack.getItemMeta();
- this.itemMeta.setDisplayName(display);
- }
- public ItemAPI(String display, String SkullOwner, int amount)
- {
- this.itemStack = new ItemStack(Material.SKULL_ITEM, amount);
- this.skullMeta = ((SkullMeta)this.itemStack.getItemMeta());
- this.skullMeta.setDisplayName(display);
- this.skullMeta.setOwner(SkullOwner);
- }
- public ItemStack build()
- {
- this.itemStack.setItemMeta(this.itemMeta);
- return this.itemStack;
- }
- public ItemStack buildskull()
- {
- this.itemStack.setItemMeta(this.skullMeta);
- return this.itemStack;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement