To gain access to the pluginSpec before a plugin is loaded, it should be possible to execute the plugin on a mock room object.
This only works if plugin authors keep all of their code inside event handlers.
Basically it would be enough to add an option to not "load" (i.e. enable) a plugin after it was added. It would implicitly remain disabled due to the lifecycle._loaded being false.
To gain access to the
pluginSpec
before a plugin is loaded, it should be possible to execute the plugin on a mock room object.This only works if plugin authors keep all of their code inside event handlers.
Basically it would be enough to add an option to not "load" (i.e. enable) a plugin after it was added. It would implicitly remain disabled due to the
lifecycle._loaded
beingfalse
.