Advertisement
riking

Untitled

Aug 25th, 2013
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         if (e.getInventory().getType() == InventoryType.CRAFTING) {
  2.             System.out.println("check1");
  3.             if (e.getRawSlot() > 38 && e.getRawSlot() < 45) { // magic numbers dependent on CRAFTING
  4.                 e.setCancelled(true);
  5.                 //DO STUFF
  6.             }
  7.             if (e.getHotbarButton >= 3) { // 0-indexed, so 4th slot = 3, and -1 = none
  8.                 e.setCancelled(true);
  9.             }
  10.             if (e.getAction() == InventoryAction.CLONE_TO_CURSOR) {
  11.                 e.setCancelled(true); // TODO create backup implementation that skips our slots
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement