# 😴 Afk

Monitors player activity and executes certain actions when players considered as "afk" and when they comes back.

## Commands & Permissions

* [Commands](../../general/commands#afk-module) link.
* [Permissions](../../general/permissions#afk-module) link.

## Features

* ✅ **Activity Points**. Players considered as active/afk based on their actions.
* ✅ **Run Commands**. Run custom commands when player enters/leaves afk mode.
* ✅ **Idle Time**. Customizable auto-afk time based on player ranks and permissions.
* ✅ **Kick Time**. Customizable auto-kick afk players time based on player ranks and permissions.
* ✅ **Placeholders**. Display player activity status in tablist and nametags using PlaceholderAPI.

## Configuration

### Activity Points

Activity points used to determine whether player is active or not. Every activity resets player's idle time to zero if player is not in afk mode. Otherwise, activity points accumulates up to required amount to move player out of afk mode.

You can configure them at `WakeUp` -> `ActivityPoints`.

### Commands

To setup commands when player leaves afk mode, use `WakeUp` -> `Commands` setting.

To setup commands when player enters afk mode, use `AFK` -> `Commands` setting.

**Syntax example:**

```yaml
Commands:
- say %player_name% is afk.
- broadcast %player_name% is afk.
```

### Idle and Kick Times

You can edit them at `AFK` -> `Idle_Time` and `AFK` -> `Kick_Time`.

There is enough config comments explaining both options, read them carefully to setup it properly.

One thing you should know is that `Kick_Time` **includes** `Idle_Time`.&#x20;

**Example**: With idle time 60 and kick time 90, player will be kicked after being afk for 30 seconds (60 + 30).
