View difference between Paste ID: uWbzutHQ and tby49D0g
SHOW: | | - or go back to the newest paste.
1
		if (e.getInventory().getType() == InventoryType.CRAFTING) {
2
			System.out.println("check1");
3-
			if (e.getRawSlot() > 38 && e.getRawSlot() < 45) {
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
		}