Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onAnvil(InventoryClickEvent e) {
- Player p = (Player) e.getWhoClicked();
- if (e.getWhoClicked() instanceof Player) {
- if (e.getView().getType() == InventoryType.ANVIL) {
- ArrayList<String> listOfLores = new ArrayList<>();
- listOfLores.add(ChatColor.DARK_PURPLE + "Glow I");
- listOfLores.add(ChatColor.DARK_PURPLE + "Poison I");
- AnvilInventory anvilInventory = (AnvilInventory) e.getInventory(); // inventory type
- ItemStack[] itemsInAnvil = anvilInventory.getContents();
- ItemStack slot1 = itemsInAnvil[0];
- ItemStack slot2 = itemsInAnvil[1];
- ItemStack slot3 = itemsInAnvil[2];
- for(String lores : listOfLores){
- if(slot1.getItemMeta().getLore().contains(lores)){
- if(slot2.getItemMeta().getLore().contains(lores)){
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement