---
description: How to configure AFK detection
---

# Configure AFK detection

### Setting up Essentials or EssentialsX

In order to use the AFK feature, you need a plugin that detects the AFK of a player. As many plugins and mostly known (essentials) is already using this logic, we are using essentials for the AFK detection.

{% hint style="info" %}
Please note that essentials has their own night skipping mechanics and might cause some unexpected occurrences. A night skipped by sleep most is always indicated by it's messages "the night was skipped"
{% endhint %}

Download essentials and put it in the plugins folder of your server.

### Setting up Placeholder API

In order to make the AFK detection work, you need to install placeholder API. This is because sleep most is connecting with placeholder API to make a connection with essentials and detect the AFK.

Download Placeholder API and put in in your plugins folder.

Start your server and run the following command

> **/papi ecloud download Essentials**

### Setting up sleep most

The last step to set up AFK players from being excluded, is setting the flag in sleep most. Join your server and go to the world you want to configure AFK exemption for.

Type the following command

> **/sleepmost setflag use-afk true**

You have now configured sleep most to detect AFK players.

{% hint style="danger" %}
**IMPORTANT**: Without Both PlaceholderAPI and Essentials installed, the AFK detection will not work. Please follow all steps above to set up properly.
{% endhint %}
