Is there a way to prevent a particular event listener from running?

Is there a way to prevent a particular event listener from running?

I’m trying to listen to ‘cms.router.beforeRoute’ before a third party plugin listens to that event and it works fine except when my listener returns null the event listener that I’m trying to avoid running kicks in and runs. I don’t seem to be able to return false in order to stop propagation from this event listener both because it expects a ?Cms/Classes/Page object and because I’m pretty sure skipping over listening to that event entirely will stop almost all other routing from working.

Is there a way of ‘turning off’ an event listener by extending a class or something similar?

Sounds like a job for a middleware.