> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edautofighter/essential/autofighter-time.md).

# Autofighter Time

Autofighter Time is a per-player resource spent while the fighter is active. It has two parts:

* **Time Balance** — the total time a player owns. It is earned externally (votes, crates, milestones, ranks...) through `/autofighter give <player> <minutes>` and consumed second-by-second while the fighter is active.
* **Daily Limit** — a cap on how much time can be *used* per day, regardless of how big the balance is. It starts at `time.base-daily-limit-minutes` (default 300) and grows with the [Daily Limit upgrade](/p/edautofighter/essential/upgrades.md). Used time resets automatically every `time.reset-hours` hours (default 24).

### Spawning requirements

When a player spawns their autofighter (via the menu or `/autofighter spawn`), the plugin checks in order:

1. The player has the `edautofighter.use` permission.
2. EdDungeons is available.
3. The player doesn't already have an active fighter.
4. The player is **inside an EdDungeons zone**.
5. The player's Time Balance is above zero.
6. The player still has daily time remaining.

Each failed check sends its own configurable message (see [Messages](/p/edautofighter/essential/messages.md)).

### While active

* Time drains from the balance and counts toward the daily usage — an idle-but-active fighter still drains time.
* When remaining time drops below `time.low-time-warning-seconds` (default 60), the player gets a low-time chat warning.
* The fighter automatically despawns when the balance runs out, the daily limit is hit, the player leaves the zone, or the player dismisses/disconnects.

### Admin commands

```
/autofighter give <player> <minutes>   # add time to a player's balance
/autofighter set <player> <minutes>    # set a player's balance
```

Both require `edautofighter.admin` and work on offline (cached) players. Hook these into your vote listener, crates or quest rewards to distribute time.
