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

# Overview

> What the Plugin API is and what plugins can do

The **[Plugin API](https://github.com/duelsplus/plugin-api)** is an **npm** package (`@duelsplus/plugin-api`) that lets you write plugins for the Duels+ Proxy. Plugins extend the proxy with custom behavior.

## What is the Duels+ Proxy?

The Duels+ Proxy sits between your Minecraft client and the Hypixel server. It forwards and processes traffic so it can track game state, detect opponents, record session stats, and expose that data to plugins. You connect to the proxy and the proxy connects to Hypixel.

## What do plugins get?

Plugins are normal Node.js modules that export a class extending **Plugin** from [`@duelsplus/plugin-api`](https://github.com/duelsplus/plugin-api). When the proxy loads your plugin, it calls `onLoad(context)` and passes a **PluginContext** - your gateway to everything the proxy offers:

* **events** - Subscribe to proxy and game events (`game:start`, `opponent:detected`, `game:victory`, etc.)
* **client** - Send chat, titles, action bar, and sounds to the player; send messages to the server as the player
* **gameState** - Current server, mode, map, and helpers like `isInGame()`, `isInLobby()`, `getSetting()`
* **commands** - Register custom commands (e.g. `/myplugin`)
* **storage** - Persistent key-value storage per plugin
* **packets** - Read-only packet observation (clientbound/serverbound)
* **logger** - Namespaced logging
* **proxy** - Proxy version info
* **players** - Opponent list, lobby players, Hypixel stats, UUID resolution
* **stats** - Session and daily stats, game log
* **scoreboard** - Team data
* **settings** - Read/write proxy settings, subscribe to changes
* **scheduler** - Managed timers (setTimeout/setInterval) that are cleaned up when the plugin unloads

**All of this is sandboxed:** plugins *cannot* access the file system (except their own storage), and the proxy controls what runs when.

## Next steps

* [Installation](/plugin-api/getting-started/installation) - Where the proxy and plugins live, and how to set up the API package
* [Your first plugin](/plugin-api/getting-started/your-first-plugin) - Build a minimal plugin from scratch
