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

Events should be resettable to a state where they can be posted again #4

Closed
Technici4n opened this issue Aug 5, 2023 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@Technici4n
Copy link
Member

Technici4n commented Aug 5, 2023

As far as I can tell it's just a matter of adding such a method to Event:

    protected void reset() {
        isCanceled = false;
        result = Result.DEFAULT;
        phase = null;
    }

(event.setCanceled(false).setResult(Result.DEFAULT).setPhase(null) will not work due to setPhase)

Of course, this should come with a nice test too.

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Aug 7, 2023
@Technici4n
Copy link
Member Author

There is no phase tracking anymore, so .setCanceled(false).setResult(Result.DEFAULT) can be used to reset events.

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

2 participants