This PR is in response to an issue raised on the Parkour plugin's discord and is a fix for an issue where custom events can sometimes be detected incorrectly.
Most events will have a handler list contained within the event class, however some events (and some plugins) have event classes that inherit the handler list from a parent class.
Parkour is one such plugin where the handler list is in a parent class. So when attempting to listen for one particular Parkour event, for example PlayerFinishCourseEvent, ConditionalEvents is firing on every Parkour event that occurs.
There is a better explanation of it here:
This fix will cause ConditionalEvents to only action the event if it exactly matches the custom event.
This PR is in response to an issue raised on the Parkour plugin's discord and is a fix for an issue where custom events can sometimes be detected incorrectly.
Most events will have a handler list contained within the event class, however some events (and some plugins) have event classes that inherit the handler list from a parent class.
Parkour is one such plugin where the handler list is in a parent class. So when attempting to listen for one particular Parkour event, for example
PlayerFinishCourseEvent
, ConditionalEvents is firing on every Parkour event that occurs.There is a better explanation of it here:
This fix will cause ConditionalEvents to only action the event if it exactly matches the custom event.