Official Plugin API for the Duels+ Proxy. Use this package to build plugins that run inside the proxy.
npm install @duelsplus/plugin-api
# or
bun add @duelsplus/plugin-apiimport { Plugin, PluginContext } from '@duelsplus/plugin-api';
export default class MyPlugin extends Plugin {
id = 'my-plugin';
name = 'My Plugin';
onLoad(ctx: PluginContext) {
ctx.events.on('game:start', () => {
ctx.client.sendChat('§aGame started!');
});
}
}Plugins live in ~/.duelsplus/plugins/<your-plugin>/. The proxy loads them at startup and provides the runtime; you use this package for types and the Plugin base class.
See the examples/ directory for full plugins:
| Plugin | Description |
|---|---|
| auto-glhf | Sends a "glhf" message at game start |
| match-alerts | Sound and title alerts for game events |
| opponent-tracker | Tracks W/L record against each opponent |
| session-overlay | Action bar session stats overlay |
| game-logger | Records game history with /gamelog |
| lobby-spy | Alerts when high-WLR opponents are in lobby |
This project is licensed under the GNU General Public License v2.0. See LICENSE for details.
