Skip to main content

Where things live

  • Proxy - You run the Duels+ Proxy (separate repo/app). It listens for your Minecraft connection and forwards to Hypixel.
  • Plugins directory - The proxy loads plugins from:
    • ~/.duelsplus/plugins/ (Linux/macOS: $HOME/.duelsplus/plugins/)
    • On Windows: C:\Users\<You>\.duelsplus\plugins\
Each subdirectory under plugins/ that contains a valid package.json with a duelsplus field is treated as one plugin.

Installing the Plugin API (for development)

Plugins depend on @duelsplus/plugin-api for types and the Plugin base class. At runtime, the proxy provides the module itself (you don’t ship node_modules with your plugin). For local development:
npm i @duelsplus/plugin-api
Then in your plugin code:
import { Plugin, PluginContext } from '@duelsplus/plugin-api';
  • Build your plugin (e.g. tsc) and put the compiled output (e.g. index.js) in the plugin directory.
  • Restart the proxy (or ensure the proxy is running) so it rescans ~/.duelsplus/plugins/ and loads your plugin.

Summary

  1. Create a folder under ~/.duelsplus/plugins/<your-plugin>/.
  2. Add package.json with main and duelsplus.id / duelsplus.name.
  3. Install @duelsplus/plugin-api in that folder for types.
  4. Write your plugin, build it, and restart the proxy.