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.
Currently all events except for the destroy event can be "canceled" by not calling
event->handleand returningfalse. 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.