> For the complete documentation index, see [llms.txt](https://glitchtechs.gitbook.io/galaxy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitchtechs.gitbook.io/galaxy/starapi-spigot-paper/timers/active-timers.md).

# Active Timers

Check if a timer is active

### Overview

The `ActiveTimers` class provides a utility for managing active Bukkit tasks in a plugin.

### Fields

#### `activeTasks`

```java
static final Map<BukkitTask, Plugin> activeTasks
```

A map that stores active Bukkit tasks along with their associated plugins.

### Methods

#### `isTaskActive`

```java
public static boolean isTaskActive(BukkitTask task)
```

Checks if a Bukkit task is currently active.

**Parameters**

* `task`: The BukkitTask to check.

**Returns**

* `boolean`: `true` if the task is active, `false` otherwise.

### Usage

1. Use the `isTaskActive` method to check if a Bukkit task is currently active.

### Example

```java
BukkitTask task = // your BukkitTask instance
boolean isActive = ActiveTimers.isTaskActive(task);
if (isActive) {
    // Task is active
} else {
    // Task is not active
}
```

In this example, we check if a Bukkit task is currently active using the `isTaskActive` method.
