I am trying to make it so that my custom enchant like one of these: This enchanted book can be applied to any sword when that sword is clicked with this book. So the meta displayName gets added to the swords lore. I've been struggling with this all day and I am very close now. At the moment when you click the sword the lore gets added to the sword this sword gets removed and a copy of the old sword with the right lore gets added to the players inventory. The problem is I want to make it so that the slot that is clicked, so the e.getSlot() gets this sword item. In order to do this I did this: Sadly this does not work the book that I clicked the sword with is on this slot and stays on this slot. If I change my code to: This does work but it's still not in the right spot I want it to be on the spot where the book is. Here is my full code for this InventoryListener: Hopefully this is enough detail if anything is unclear please let me know I will try to explain it.