mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-31 07:40:16 +01:00
37127c1f2b
The old ListenerManager is removed, new system in place. Removed doesManageListeners(). (The new system isn't that new, but it's been fixed and adapted to using RegistrationOrder.) New * Register all Bukkit events via the new EventRegistryBukkit. * This way listeners can be ordered by numeric priority and tags (regular expressions for beforeTag and afterTag). * Unregistering listeners is possible (a listener node stays in the Bukkit registry, but only one per event). * It's possible to add listeners with minimal impact (MiniListener). * The registry registers by event class 'hard' i.e., no relations between already registered classes are checked. * Order isn't necessarily stable nor even reproducible for randomized start conditions with the same elements. Point * Compatibility hooks can easily place event listeners before/after/between NCP default listeners, without resorting to tricks like 'load-before'. * Future registry of NCP itself: unregistering listeners is necessary for runtime-removable checks, order is useful if not necessary, to be able to add check listeners at any point of time. Breaks: * Anything relying on the previous (optional) managelisteners feature. Missing: * Lots of testing/inspection. * Ensure all NCP listeners are coming with name/tag at least. * Provide meaningful tags/RegistrationOrder for fine grained access (e.g. after feature.moving but before feature.inventory). * Change cncp to hard depend on NCP and use listener priorities. |
||
---|---|---|
.. | ||
main | ||
test/java/fr/neatmonster/nocheatplus |