Damn, this forum is like a graveyard sometimes. Either that or no one actually knows what they’re doing.
So yeah, I ended up doing the following:
- Override the load() function in your plugin class
- Store a reference to the bridge object
- Use that reference to call the trigger events instead.
e.g in your main plugin class:
public class MyPlugin extends Plugin {
Bridge myBridge;
@Override
public void load() {
myBridge = bridge;
}
@PluginMethod
public void someCall(PluginCall call) {
// do whatever you're doing.
myBridge.triggerJSEvent(....)
}
}