Provide registered listeners in PluginManager#9643
Closed
Aeltumn wants to merge 1 commit into
Closed
Conversation
Machine-Maker
requested changes
Aug 24, 2023
Member
Machine-Maker
left a comment
There was a problem hiding this comment.
Also, we generally steer clear of using "var" anywhere.
9b12016 to
38ab827
Compare
38ab827 to
fea8b59
Compare
Contributor
Author
|
Rebased and ready for re-review. |
powercasgamer
suggested changes
Nov 12, 2023
powercasgamer
approved these changes
Nov 15, 2023
e01ce03 to
00db803
Compare
b37ebf8 to
0cd87d5
Compare
Contributor
Author
|
Rebased and cleaned up to match new guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces new methods on the PluginManager that supersede the old registerEvent/registerEvents methods. These new methods return a RegisteredListener object which can be used by plugins to better handle their registered listeners. The RegisteredListener now also has an unregister() method which can be used to directly unregister that listener from all relevant handler lists instead of having to iterate over them all.