1.16.5 How to make a slot only let 1 type of item in it?

Discussion in 'Spigot Plugin Development' started by Bluehawk409, Jun 21, 2021.

  1. Hi, I am trying to make a slot in a GUI that only lets swords inside of it. Any way how to do this?
  2. On the inventory click event or pickup item event check if it’s that slot and if it isn’t a sword going into it cancel the event.
  3. But I need to be able to get what item was put in the slot, and cancel the event if it doesnt match, and I don't know how to get what item was put in the slot.