resolvePlugin<E extends NodeFlowPlugin> method
E?
resolvePlugin<E extends NodeFlowPlugin>()
Resolves a plugin by type.
Checks the controller's attached plugins first, then falls back to the config's plugin registry.
Returns null if the plugin is not found.
Example:
final minimap = controller.resolvePlugin<MinimapPlugin>();
minimap?.toggle();
Implementation
E? resolvePlugin<E extends NodeFlowPlugin>() {
// First check if already attached
var ext = getPlugin<E>();
if (ext != null) return ext;
// Try to get from registry and attach
ext = config.pluginRegistry.get<E>();
if (ext != null) {
addPlugin(ext);
}
return ext;
}