Advertisement
Legt_Gaming1

Untitled

Oct 9th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1.  
  2. @EventHandler
  3. public void onInventoryMoveItem(InventoryClickEvent event) {
  4.  
  5. ItemStack start = new ItemStack(Material.ENCHANTED_BOOK, 1);
  6. ItemMeta meta = start.getItemMeta();
  7. meta.setDisplayName(ChatColor.RED + "Island Flight");
  8. ArrayList<String> lores = new ArrayList<String>();
  9. lores.add("");
  10. lores.add(ChatColor.GOLD + "Boots Enchant");
  11. lores.add(ChatColor.GRAY + "Allows Flight In Island World");
  12. meta.setLore(lores);
  13. start.setItemMeta(meta);
  14.  
  15. if (event.getAction() == InventoryAction.SWAP_WITH_CURSOR) {
  16. if (event.getCursor().equals(start))
  17. if (event.getCurrentItem().equals(new ItemStack(Material.DIAMOND_BOOTS, 1))) {
  18. event.getWhoClicked().sendMessage(Prefix + ChatColor.RED + "Island Flight " + ChatColor.GRAY + " Enchant Successfully Added!");
  19. event.getWhoClicked().getInventory().remove(start);
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement