Advertisement
Guest User

Untitled

a guest
Jul 1st, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1.     @EventHandler
  2.     public void InvClic(InventoryClickEvent event){
  3.         if(event.getAction().equals(InventoryAction.COLLECT_TO_CURSOR)){
  4.             if(event.getCursor().equals(new ItemStack( Material.WOOL, 1, (byte)11 ))){
  5.                 event.setCancelled(true);
  6.             }
  7.         }
  8.         else if(((PlayerInventory) event.getInventory()).getHelmet().equals(new ItemStack( Material.WOOL, 1, (byte)11 ))){
  9.             event.setCancelled(true);
  10.         }
  11.         else if(event.getAction().equals(InventoryAction.UNKNOWN)){
  12.             event.setCancelled(true);
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement