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

Cancelable event #399

Open
Bafbi opened this issue Jun 23, 2023 · 2 comments
Open

Cancelable event #399

Bafbi opened this issue Jun 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Bafbi
Copy link
Contributor

Bafbi commented Jun 23, 2023

Describe the problem related to your feature request.

With the bukkit api something that's really often used is the ability to cancel events and that also reverse the action for the client.

Currently in Valence events are sent at the same time that the packet is treated by the plugin, so it's not possible to cancel the event and reverse it manually make no sense neither cause it has already been treated by the plugin

What solution would you like?

I think we should separate the event from the plugin code.
Make the eventWriter run firstly then the user can handle the event and cancel it if he wants, finally the plugin runs his code and reverse the client if it has been canceled or treat it if not.

What alternative(s) have you considered?

Open to suggestions

@rj00a rj00a added the enhancement New feature or request label Jul 13, 2023
@pepperoni21
Copy link
Contributor

I don't think bevy allows to mutate the event and then fetch it once listeners have been triggered

@Bafbi
Copy link
Contributor Author

Bafbi commented Aug 20, 2023

No, that's why I'm creating a new event system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants