So i've built an EventBus around flows and I'm try...
# flow
r
So i've built an EventBus around flows and I'm trying to implement a priority of subscriptions would there be a good way to implement this?
Like i want to use something like this
Copy code
subscribeFlow<BukkitPluginUnloadEvent>(Priority.MONITOR)
                .filter { event -> event.stage == PluginEvent.Stage.PRE }
                .mapNotNull { event -> event.plugin as? MinixPlugin }
                .collect(PluginService::unloadPlugin)
c
What is EventBus?? And why do you use it?
r
Its an interface which allows posting events to it which can be listened to by subscribers and i use it to wrap the bukkit event api since i target more than just that platform
c
What do you mean by 'I taryet more than just that platform'?
r
Its part of my library which wraps multiple minecraft server types, bukkit, velocity, bungeecord etc they are all jvm based but with different apis, and the flowbus is designed to wrap each of them and simplify interacting with them