mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 15:19:56 +00:00
This is quite an interesting bug. If you have ```php class A{ public function onMove(PlayerMoveEvent $event){} //shouldn't be a handler because this class isn't a Listener } class B extends A implements Listener{} ``` then ```php registerEvents(new B, $plugin); ``` then `A::onMove()` will be registered as an event handler even though `A` is not an instanceof `Listener`. This was observed by noting that plugins which do something like `extends PluginBase implements Listener` causes `registerEvents()` to try and register `PluginBase` methods as event handlers, which could lead to astonishing behaviour. then A::onMove() will be registered as an event handler even though A is not an instanceof Listener. This was observed by noting that plugins which do something like "extends PluginBase implements Listener" causes registerEvents() to try and register PluginBase methods as event handlers, which could lead to astonishing behaviour.