How can I get all task in all plugin?

Sponge.getAllTask() ?

I want to get all task in all plugin to cancel when stopping server.

How can I get all task in all plugin ?

Please help me.

Something like

    Scheduler scheduler;
    PluginContainer container;
    Set<ScheduledTask> tasks = scheduler.tasks(container);
1 Like

Thank for you care!