Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ItemSample {
- private static ItemSample instance;
- public static ItemStack TheBox = new ItemStack(Material.CHEST);
- public static ItemStack Ship = new ItemStack(Material.BOAT);
- public static ItemStack Keep = new ItemStack(Material.EMERALD_BLOCK);
- public static ItemMeta TheBoxMeta = TheBox.getItemMeta();
- public static ItemMeta ShipMeta = Ship.getItemMeta();
- public static ItemMeta KeepMeta = Keep.getItemMeta();
- private ItemSample() {
- instance = this;
- TheBoxMeta.setDisplayName(ShipmentBox.Name);
- TheBoxMeta.setLore(ShipmentBox.Lores);
- ShipMeta.setDisplayName(ShipmentBox.ShipName);
- ShipMeta.setLore(ShipmentBox.ShipLores);
- KeepMeta.setDisplayName(ShipmentBox.KeepName);
- KeepMeta.setLore(ShipmentBox.KeepLores);
- }
- public static ItemSample getInstance() {
- if (instance == null) {
- instance = new ItemSample();
- }
- return instance;
- }
- public static void GiveBox(Player p) {
- TheBoxMeta.setDisplayName(Utility.TransColor(ShipmentBox.Name + " &6&l&m-&e Owned by &l" + p.getName()));
- TheBox.setItemMeta(TheBoxMeta);
- p.getInventory().addItem(TheBox);
- }
- public static void GiveBox(Player p, int amount) {
- TheBoxMeta.setDisplayName(Utility.TransColor(ShipmentBox.Name + " &6&l&m-&e Owned by &l" + p.getName()));
- TheBox.setItemMeta(TheBoxMeta);
- ItemStack TheBox2 = TheBox;
- TheBox2.setAmount(amount);
- p.getInventory().addItem(TheBox2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement