I'm trying to get tridents to store in slot 2 of the player's inventory for a minigame. The trident has the loyalty enchantment, but I think the pick up event is also triggered when tridents with loyalty return to the player. I keep getting the error "can't drop air" when I run this code. Tried running with all addons uninstalled, but got the same error. Any ideas?
Code:
on pick up of trident:
cancel event
delete item
set slot 2 of player's inventory to item