Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Stop Task uses Index instead of Integer object #14

@CubBossa

Description

@CubBossa

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);
        }
    }```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions