Add an inventory event handler