Skip to content

eventHandler

ENDERZOMBI102 edited this page Aug 20, 2020 · 1 revision

The eventHandler has methods that make creating, sending and react to events as simple as a function call. The eventHandler object is global (shared for all plugins), so a plugin emitting an event may trigger a callback on another plugin.

eventHandler.on(event, callback)

registers CALLBACK on the EVENT listener
when EVENT is triggered CALLBACK will be executed callbacks should implement the same parameter names that the event will give


eventhandler.send(event, **kwargs)

triggers EVENT with the given kw args, it may not have kw args

Default events

By default BM ships with those events:

Event Arguments Argument types Description
logWindowObject object logWindow triggered when the log window finishes loading, object is the logWindow object
Clone this wiki locally