Hey, I currently have a scheduler being canceled by finding a task name and cancelling it.
How can I do the same but only if it is containing a certain player UUID?
Current code:
Sponge.getScheduler().getTasksByName(String.valueOf(gym3)).forEach(t -> t.cancel());
Current Issue: Cancels all tasks within that name. Which is bad for when mutliple people are in this task (it is a per player cooldown).
Looking for something close to this, but with the added if contains check within the format for the player’s UUID.
So like, get scheduler with name of task and if it contains the UUID referenced then cancel that one task instead of them all.
May be stupid or not possible, but I took a break from coding for around a year.
Thanks.