Cancel Timers

Cancel a timer

Overview

The CancelTimer class provides a utility for cancelling Bukkit tasks and removing them from the list of active tasks.

Methods

cancelTask

public static void cancelTask(BukkitTask task)

Cancels a Bukkit task and removes it from the list of active tasks.

Parameters

  • task: The BukkitTask to cancel.

Usage

  1. Call the cancelTask method and pass the Bukkit task you want to cancel as a parameter.

Example

BukkitTask task = // your BukkitTask instance
CancelTimer.cancelTask(task);

In this example, we cancel a Bukkit task using the cancelTask method.

Last updated