addPluginEventHandler method
Add a handler for a special message type If the message type has been handled by one handler, the old handler will be overwrided by the new one
Implementation
void addPluginEventHandler(MessageType type, Function handler) {
messageHandler[type] = handler;
}