Why does this not work?

EDIT: Forgot to implemet cancelling, I am stupid

I am trying to create a custom event but it doesn’t work.
When I call registerModule(module) it does not cancel the event.

I added some debug (Visible in the code) and my console says “3 1 2 5”
I also tried logging what Sponge.getEventManager().post(event); returns, which is false. (Not visible in code)

My events are registered (else it wouldn’t say 1 2).


Please post sources of ModuleRegisterEvent

Already found the problem, thank you.