Replace OnPlayeDie with OnPlayerDeath, fixes component boxes being accessible on corpses instead of dumping its items into the inventory
Use hooks to detect other plugins moving the component box out of your inventory and try to move it back
Include player corpses when checking if right-clicked items should go directly to the component box