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

Make object destroy events cancelable #4

Open
Foxbud opened this issue Jan 20, 2021 · 0 comments
Open

Make object destroy events cancelable #4

Foxbud opened this issue Jan 20, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Foxbud
Copy link
Owner

Foxbud commented Jan 20, 2021

Currently all events except for the destroy event can be "canceled" by not calling event->handle and returning false. This includes create events.

When it comes to destroy events, if a mod listener cancels the event, the instance will still be destroyed, but none of it's destroy listeners (vanilla or mod) will be called. That means that canceling a destroy event effectively makes it such that the instance was deleted. The expected behavior is the instance not being destroyed or deleted.

As it stands, I'm not actually sure if this is possible. Further analysis is required.

@Foxbud Foxbud added the bug Something isn't working label Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant