Hey guys, I'm putting automatically lapis on enchant open, but when player closes the inventory, the unusued lapis drops out. How can I disable that ?
Maybe you could check if the inventory is an enchantment table on InventoryCloseEvent and set the lapis slot to air.
To build on that, might also want to check InventoryClickEvent and stop the player from clicking/dragging the lapis at all so they dont just drag it out of the window to drop it without closing the inventory.