You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
Hey there. I just called the stopTask(taskId) Method in the Taskmanager. It removes the taskId from the running tasks arraylist but as its an int it will be interpreted as index and not as the id. I think casting it to Integer will fix the problem. Whats the idea of the running tasks arraylist? If its not important I would just call getScheduler().cancelTask(id) for now.
public void stopTask(int taskId) {
if (this.runningTasks.contains(taskId)) {
Bukkit.getScheduler().cancelTask(taskId);
this.runningTasks.remove(taskId);
}
}```
The text was updated successfully, but these errors were encountered:
The only purpose of the runningTasks ArrayLists is to prevent TaskManager#stopTask from being used to stop BukkitTasks that weren't started by ParticleLib. But you're right, it's pretty useless. I'll remove the list in the next update.
Hey there. I just called the stopTask(taskId) Method in the Taskmanager. It removes the taskId from the running tasks arraylist but as its an int it will be interpreted as index and not as the id. I think casting it to Integer will fix the problem. Whats the idea of the running tasks arraylist? If its not important I would just call getScheduler().cancelTask(id) for now.
The text was updated successfully, but these errors were encountered: