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

[FEATURE] Pre & Post events #690

Open
1 task done
svaningelgem opened this issue Jan 19, 2025 · 0 comments
Open
1 task done

[FEATURE] Pre & Post events #690

svaningelgem opened this issue Jan 19, 2025 · 0 comments
Labels
enhancement (uncategorised) New feature or request

Comments

@svaningelgem
Copy link
Contributor

What is the feature request for?

Hello,

The event rework is nice, but as an example: PlayerLeaveTeamEvent: it triggers BEFORE the actual thing happened. Now, if this gets cancelled by 1 plugin, but intercepted by a 2nd one. Plugin1 will know it's cancelled, but Plugin2 will not if it came before. Or for example with donations, there are so many ways it still can fail, so you don't know for sure if the event took place.

Thus my proposal: split all these into Pre & Post events so if you want to know something happened (and it is finalized): listen to the post-event. If you want to interact with the event: listen to the pre-event.

I already did this in my own codebase and could integrate it into BetterTeams, but if it's not needed, I'm not going to do the efforts obviously.

attention: this will likely break a lot of plugins, because the event names nearly all changed from <name> to <Pre>name because most of them were cancellable, and not the final state. If you have any suggestion for this to break less, I'm happy to hear it.

Relevant links

No response

Additional Information

No response

Feature requests are not going to be implemented by booksaw, instead you will have to find another developer to make a pull request to implement the feature.

  • I understand
@svaningelgem svaningelgem added the enhancement (uncategorised) New feature or request label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement (uncategorised) New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant