> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sentrystudios.org/llms.txt
> Use this file to discover all available pages before exploring further.

# AFK Rewards GUI

> A centralized hub for players to claim rewards, exchange points.

Thank you for choosing the **Sentry Studios AFK Rewards GUI**. This configuration provides a powerful, interactive shop menu for your players to exchange their hard-earned AFK points for coins or server money.

![AFK Rewards GUI Overview](https://mintcdn.com/sentrystudios/vtC-AGi2aFtfmbSf/images/config_afk.png?fit=max\&auto=format\&n=vtC-AGi2aFtfmbSf\&q=85\&s=b70055603b5bf400c9d56591732bd549)

***

## Key Features

The AFK GUI connects directly to ExcellentEconomy and EssentialsX to provide a seamless reward experience.

> **Integrated Point Exchange**
>
> Allows players to exchange their AFK points for either standard server money (Vault/Essentials) or premium Coins (ExcellentEconomy).

> **Smart Transaction Checks**
>
> Utilizes javascript expressions to ensure players actually have enough points before purchasing, preventing negative balances.

> **Instant Feedback**
>
> Clicking a reward plays a level-up sound and outputs a sleek, color-coded success message directly into the player's chat.

> **Warp Integration**
>
> Includes a dedicated button to instantly teleport players directly to the server's AFK zone.

![Interactive Chat Feedback](https://mintcdn.com/sentrystudios/vtC-AGi2aFtfmbSf/images/config_afktoast.png?fit=max\&auto=format\&n=vtC-AGi2aFtfmbSf\&q=85\&s=764967c260750bcabf5bc35b8d10c4ed)

***

## Available Exchanges

By default, the GUI comes pre-configured with two rows of rewards using the ExcellentEconomy currencies provided in the package.

![AFK Exchange Tiers](https://mintcdn.com/sentrystudios/vtC-AGi2aFtfmbSf/images/config_afktiers.png?fit=max\&auto=format\&n=vtC-AGi2aFtfmbSf\&q=85\&s=6b66f83c3befdd5320795d911f125536)

> **Premium Coins**
>
> **Cost:** 20 AFK Points = 1 Coin
>
> Includes exchange buttons for 1, 10, and 50 Coins.

> **Standard Money**
>
> **Cost:** 5 AFK Points = \$100
>
> Includes exchange buttons for \$100, \$500, and \$1,000.

> [!TIP]
>
> **Want to customize costs?** You can easily change the prices by modifying the `click_requirement` expression (e.g., `%ExcellentEconomy_balance_raw_afkpoints% >= 20`) and the corresponding `click_commands` in the `afk.yml` file.

***

## Commands & Permissions

By default, the main GUI is bound to two easy-to-remember aliases.

```yaml Open Your AFK Shop theme={null}
# Aliases built into the configuration:
/afk
/afkshop
```

> [!NOTE]
>
> The menu requires the permission node `deluxemenus.menu.afk` to open. By default, most permission managers grant access to DeluxeMenus to default players, but if your players get a "no permission" error, ensure they have this node!

***

## Installation Guide

Before installing, ensure you have the required dependencies: **DeluxeMenus**, **ExcellentEconomy**, **NightCore**, **EssentialsX**, and **PlaceholderAPI**.

**1. Download Placeholder Expansions**

This menu uses PlaceholderAPI for console commands. You **must** install the required expansions.

Run the following commands in your server console (or in-game as an OP):

```bash theme={null}
/papi ecloud download Player
/papi reload
```

**2. Merge ExcellentEconomy Files**

> [!WARNING]
>
> **Do NOT** simply drag and drop the entire `ExcellentEconomy` folder into your plugins directory if you already use ExcellentEconomy. This will overwrite your existing config!

Instead, open the `ExcellentEconomy` folder from our package, and manually merge the contents of our `currencies` and `lang` folders into your server's `plugins/ExcellentEconomy/` directory.

**3. Install the Menu Configuration**

Drag and drop the `afk.yml` file into your server's `plugins/DeluxeMenus/gui_menus/other_menus/` folder.

**plugins**

**DeluxeMenus**

**gui\_menus**

**other\_menus**

**afk.yml**

**4. Register in DeluxeMenus**

Open your DeluxeMenus `config.yml` file and register the menu under the `gui_menus:` section:

```yaml config.yml theme={null}
gui_menus:
  afk:
    file: other_menus/afk.yml
```

**5. Set Your AFK Warp**

Make sure you have created an Essentials warp named `afk` by running `/setwarp afk` where you want your AFK zone to be.

**6. Reload Plugins**

Finally, reload both DeluxeMenus and ExcellentEconomy to apply the new configurations:

```bash theme={null}
/dm reload
/ee reload
```

***

## Troubleshooting

> **Players receive an error when buying rewards**
>
> Ensure **EssentialsX** is installed so players can receive standard money, and ensure **ExcellentEconomy** is running properly with the `afkpoints` and `coins` currencies registered.

> **The menu isn't opening / Command not found**
>
> Ensure you registered the file correctly in your `config.yml` and that there are no YAML spacing errors. After registering, you must run `/dm reload` for it to take effect.

> **Warp AFK button says 'Warp not found'**
>
> You must create the warp using EssentialsX. Stand in your AFK area and run `/setwarp afk`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.