Add "on player clicks in inventory" and "on player changes gamemode" world events.