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