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

[API-8] Add ScheduledTask#isCancelled() #2146

Merged
merged 3 commits into from
Jul 4, 2020

Conversation

ItsDoot
Copy link
Member

@ItsDoot ItsDoot commented Jul 3, 2020

My "Avatar the Last Airbender in Minecraft" plugin manages a Task per ability execution, so that abilities can be executed over an indefinite amount of time. I need to be able to check if tasks are cancelled, so that I can correctly cleanup the object that wraps them.

Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about also adding an optional callback on the task that will be called if the task gets cancelled?
That way you don't have to check the task periodically.

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

Successfully merging this pull request may close these issues.

3 participants