SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.54k stars 1.1k forks source link

Event handlerList system? #2381

Open Mystiflow opened 6 years ago

Mystiflow commented 6 years ago

I want to create a subclass that extends the Event superclass.

Currently if I call this event, the superclass event will be called.

It would be very useful if we had a system similar from Spigot where we can override the handlerList in the subclass to a new instance to stop calling events for the superclass.

My use case is to properly implement the following commit: https://github.com/Mystiflow/BungeeCord/commit/18c3c1cb32f57066076bc049e75f439e591c5e87 because calling the superclass with the new event would break existing plugins.

Janmm14 commented 6 years ago

Just make the new event not extend ServerDisconnectEvent?