You don't, mostly. Only issues and versions really fire events, although the list is growing.
For writing them, see https://developer.atlassian.com/display/JIRADEV/Writing+JIRA+Event+Listeners+with+the+atlassian-event+Library
And, no, you can't install add-ons into OnDemand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.