Drop last item in hands and nothing else

Hello guys. I really need plugin like that for my forge roleplay server. I use the newest version of sponge. Can someone write something like this for me? It will be great

Hi. Just some clarification, do you mean the last item in hand by the item in the current hand (and/or if there is no item in the hand then the last item to be in that hand that is still in the inventory)? The last hand item by hotbar slot 9? Or last item by the top right most item in the inventory?

Edit:
Oh and what about items in the second hand?

If i remember correctly RP servers want to keepInventory=true, but still drop the “active”/equipped items when dieing. Keeps the eco rolling a bit without pvp becoming a problem.