Add event for plugin hooks

Merge #7