In plugins, registerType() needs to be called before initxxx(), otherwise published events don't get exported.

...