Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed many missing event-calls #111

Closed
wants to merge 8 commits into from

Conversation

supercrafter333
Copy link
Contributor

No description provided.

@supercrafter333
Copy link
Contributor Author

This doesn't fix the bug that the PlotClaimAsyncEvent isn't called!

@supercrafter333 supercrafter333 marked this pull request as draft August 20, 2024 02:20
@supercrafter333 supercrafter333 marked this pull request as draft August 20, 2024 02:20
@supercrafter333
Copy link
Contributor Author

I'll need help to fix that bug.

@supercrafter333
Copy link
Contributor Author

libAsyncEvent #2 should be fixed before merging this.

@ColinHDev ColinHDev added Category: API Related to the plugin's API Status: Declined Issue / PR has been declined by maintainers labels Aug 23, 2024
@ColinHDev
Copy link
Owner

Since these events' listener execution is asynchronous, the return of their call() method does not automatically indicate that all listeners already finished executing. Instead, we rely on a callback, that notifies the plugin once every listener successfully handles the event and we can continue with the current logic.
The create() method only hides this and wraps it around a generator, so we can easily use it in combination with await-generator, for example here in the PlotMergeAsyncEvent.

@ColinHDev ColinHDev closed this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Related to the plugin's API Status: Declined Issue / PR has been declined by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants