Plugin dev docs, part 2: events