Add example of usage of events in plugin