Here is some stuff you may need to know to work with event handlers.
event.xml
Here is an example of an event.xml file. Use it to create a new event.xml file for your custom event handler in the META-INF directory of your jar file.
DTD for custom event handler
An event handler works by subscribing to system events and then responding when event occurs. You subscribe to events by placing an XML file in the custom event handler JAR that describes what events are being monitored and who is doing the monitoring.
ENABLE_UI_FOR_CUSTOM_EVENT_HANDLERS
To support branding and customization changes, set the ENABLE_UI_FOR_CUSTOM_EVENT_HANDLERS variable to true.