Added the ability to run a command when an event is run