PlugDev test loop
PlugDev is the local test environment for Minecraft plugins. Prefer it over manually starting Paper and copying JARs.
For agent work, use structured MCP tools when available or CLI --json from the plugin project directory. Check plug -V first: background capture and native player controls require CLI 1.4.0+ (MCP 0.5.0+). Read capture.md for screenshots, GIFs, animated cursors, GUI clicks, movement and test players. Reuse the user's configured client; do not replace their Prism instance or move desktop focus. If the installed skill contains references/local-preferences.md, read it for preferences specific to that machine.
First moves (agent: set up the best env)
Inspect the project instructions, configuration, selected module and running server first. Reuse the installed CLI and working environment. For setup requested by the user:
Install CLI if plugdev / plug is missing from PATH:
npm install -g @plugdev/cli
Or one-shot: npx @plugdev/cli@latest <command>.
Initialize the project if there is no plugdev.yml:
plugdev init --setup
This writes project config and prefetches the selected runtime into ~/.plugdev/. Agent rules and MCP are optional separate setup; do not overwrite working project instructions. agent install --mcp merges .cursor/mcp.json and .mcp.json. After the first MCP write, the editor needs to reload MCP.
If Codex project wiring is requested:
plugdev agent install --codex
Boot the loop:
plug run
If boot or detection fails, run plug doctor and fix what it reports (Java 21+, Node 22+, Gradle/Maven). Paper/Folia 26.x needs Java 25+.
Multi-module reactors: plugdev module list then plugdev module use <name> (or TUI Module).
Background screenshots/GIFs (Windows): read capture.md. Start the local server, then use capture shot|gif|run. Select an existing Fabric 26.1.2 Prism instance with client start --instance "FO 26.1.2" for native screenshots, animated cursors, GUI clicks and player control. Otherwise automatic launch uses an isolated Minecraft 1.21.4 profile with capped rendering and idle shutdown; existing clients can be bound explicitly. Capture never activates a window or injects desktop input. Requires FFmpeg gfxcapture and FFprobe. Bots cannot render screenshots.
Day loop
| Goal |
Command |
| Interactive TUI |
plugdev / plug |
| One-shot test loop |
plug run |
| Wipe worlds |
plug clean |
| Cold run folder |
plug clean --all |
| Multi-module pick |
`plugdev module list |
| Test deps |
`plugdev deps add |
| Headless (agents) |
`plugdev server start |
| Listing shots/GIFs (Windows) |
plugdev capture run / shot / gif |
| Scripting |
add --json |
After the server is ready, joining players are auto-OP when dev.op is true (default). Type console commands in the same terminal (RCON), e.g. list, gamemode creative @a.
MCP (optional structured tools)
When .cursor/mcp.json or .mcp.json includes PlugDev (via init --mcp / agent install --mcp), prefer MCP tools for headless control:
plugdev_doctor, plugdev_setup, plugdev_init
plugdev_build_plugin, plugdev_sync_plugin
plugdev_start_server, plugdev_stop_server, plugdev_get_server_status
plugdev_tail_logs, plugdev_run_server_command, plugdev_op_player
plugdev_list_modules, plugdev_use_module
plugdev_list_deps, plugdev_add_dep, plugdev_remove_dep
plugdev_agent_install, plugdev_cache_prefetch, plugdev_cache_status, plugdev_clean
plugdev_list_configs, plugdev_get_config, plugdev_set_config
plugdev_open_client — embedded client join
plugdev_capture_doctor, plugdev_capture_shot, plugdev_capture_gif, plugdev_capture_run
plugdev_run_test_loop — build → sync → start → OP
CLI remains primary for interactive plug run (server + watch + client join). MCP is the same loop without a TTY.
Install MCP alone: npx -y @plugdev/mcp (stdio).
Hard rules
- Prefer
plug run over manually starting Paper.
- Do not use Bukkit
/reload — PlugDev uses safe JAR reload via bootstrap.
- On Folia, prefer full restart over safe reload.
- Optional
--hotswap / watch.reload.java: hotswap is method-body JDWP redefine only; structural changes fall back to safe reload.
- Do not delete
~/.plugdev unless the user asks (plugdev cache clear).
- Background capture needs a non-minimized rendered Windows client and unlocked desktop. Never refocus Minecraft or substitute desktop capture. Use
capture client for background startup; open --client is the interactive launcher. Do not claim headless or untested platform support.
Facts
| Item |
Value |
| Bins |
plug and plugdev (same CLI) |
| Config |
plugdev.yml |
| Run dir |
.plugdev/run/ |
| Cache |
~/.plugdev/ |
| Modules |
`plugdev module list |
| Deps |
`plugdev deps add |
| Reload |
Safe JAR reload (not /reload); optional --hotswap for method bodies |
| Folia |
Prefer full restart over safe reload |
| Headless |
`plugdev server start |
| MCP |
npx @plugdev/mcp — structured tools for the same loop |
| Skill install |
npx skills add mattbaconz/plugdev --skill plugdev |
| Docs |
https://pluglabs.app/plugdev |
1---2name: plugdev3description: Use when the user says "use PlugDev", or when testing, booting, hot-reloading, or joining a local Minecraft Paper, Spigot, Folia, or Purpur plugin project — PlugDev CLI setup, plug run, plug doctor, multi-module pick, deps, headless server commands, Folia restart, listing screenshots/GIFs (Windows capture scenarios), agent wiring (Cursor/Claude/Codex), and optional MCP tools for structured control.4---56# PlugDev test loop78PlugDev is the local **test environment** for Minecraft plugins. Prefer it over manually starting Paper and copying JARs.910For agent work, use structured MCP tools when available or CLI `--json` from the plugin project directory. Check `plug -V` first: background capture and native player controls require CLI 1.4.0+ (MCP 0.5.0+). Read [capture.md](references/capture.md) for screenshots, GIFs, animated cursors, GUI clicks, movement and test players. Reuse the user's configured client; do not replace their Prism instance or move desktop focus. If the installed skill contains references/local-preferences.md, read it for preferences specific to that machine.1112## First moves (agent: set up the best env)1314Inspect the project instructions, configuration, selected module and running server first. Reuse the installed CLI and working environment. For setup requested by the user:15161. **Install CLI** if `plugdev` / `plug` is missing from PATH:17 ```powershell18 npm install -g @plugdev/cli19 ```20 Or one-shot: `npx @plugdev/cli@latest <command>`.21222. **Initialize the project** if there is no `plugdev.yml`:23 ```powershell24 plugdev init --setup25 ```26 This writes project config and prefetches the selected runtime into `~/.plugdev/`. Agent rules and MCP are optional separate setup; do not overwrite working project instructions. `agent install --mcp` merges `.cursor/mcp.json` and `.mcp.json`. After the first MCP write, the editor needs to reload MCP.27283. If Codex project wiring is requested:29 ```powershell30 plugdev agent install --codex31 ```32334. **Boot the loop:**34 ```powershell35 plug run36 ```37385. If boot or detection fails, run `plug doctor` and fix what it reports (Java 21+, Node 22+, Gradle/Maven). Paper/Folia 26.x needs Java 25+.39406. Multi-module reactors: `plugdev module list` then `plugdev module use <name>` (or TUI Module).41427. **Background screenshots/GIFs (Windows):** read [capture.md](references/capture.md). Start the local server, then use `capture shot|gif|run`. Select an existing Fabric 26.1.2 Prism instance with `client start --instance "FO 26.1.2"` for native screenshots, animated cursors, GUI clicks and player control. Otherwise automatic launch uses an isolated Minecraft 1.21.4 profile with capped rendering and idle shutdown; existing clients can be bound explicitly. Capture never activates a window or injects desktop input. Requires FFmpeg `gfxcapture` and FFprobe. Bots cannot render screenshots.4344## Day loop4546| Goal | Command |47|------|--------|48| Interactive TUI | `plugdev` / `plug` |49| One-shot test loop | `plug run` |50| Wipe worlds | `plug clean` |51| Cold run folder | `plug clean --all` |52| Multi-module pick | `plugdev module list|use` |53| Test deps | `plugdev deps add|remove|list` |54| Headless (agents) | `plugdev server start|stop|status|command|logs` |55| Listing shots/GIFs (Windows) | `plugdev capture run` / `shot` / `gif` |56| Scripting | add `--json` |5758After the server is ready, joining players are **auto-OP** when `dev.op` is true (default). Type console commands in the **same terminal** (RCON), e.g. `list`, `gamemode creative @a`.5960## MCP (optional structured tools)6162When `.cursor/mcp.json` or `.mcp.json` includes PlugDev (via `init --mcp` / `agent install --mcp`), prefer MCP tools for headless control:6364- `plugdev_doctor`, `plugdev_setup`, `plugdev_init`65- `plugdev_build_plugin`, `plugdev_sync_plugin`66- `plugdev_start_server`, `plugdev_stop_server`, `plugdev_get_server_status`67- `plugdev_tail_logs`, `plugdev_run_server_command`, `plugdev_op_player`68- `plugdev_list_modules`, `plugdev_use_module`69- `plugdev_list_deps`, `plugdev_add_dep`, `plugdev_remove_dep`70- `plugdev_agent_install`, `plugdev_cache_prefetch`, `plugdev_cache_status`, `plugdev_clean`71- `plugdev_list_configs`, `plugdev_get_config`, `plugdev_set_config`72- `plugdev_open_client` — embedded client join73- `plugdev_capture_doctor`, `plugdev_capture_shot`, `plugdev_capture_gif`, `plugdev_capture_run`74- `plugdev_run_test_loop` — build → sync → start → OP7576CLI remains primary for interactive `plug run` (server + watch + client join). MCP is the same loop without a TTY.7778Install MCP alone: `npx -y @plugdev/mcp` (stdio).7980## Hard rules8182- Prefer `plug run` over manually starting Paper.83- Do **not** use Bukkit `/reload` — PlugDev uses safe JAR reload via bootstrap.84- On **Folia**, prefer full restart over safe reload.85- Optional `--hotswap` / `watch.reload.java: hotswap` is method-body JDWP redefine only; structural changes fall back to safe reload.86- Do not delete `~/.plugdev` unless the user asks (`plugdev cache clear`).87- Background capture needs a non-minimized rendered Windows client and unlocked desktop. Never refocus Minecraft or substitute desktop capture. Use `capture client` for background startup; `open --client` is the interactive launcher. Do not claim headless or untested platform support.8889## Facts9091| Item | Value |92|------|--------|93| Bins | `plug` and `plugdev` (same CLI) |94| Config | `plugdev.yml` |95| Run dir | `.plugdev/run/` |96| Cache | `~/.plugdev/` |97| Modules | `plugdev module list|use` (multi-module Maven/Gradle) |98| Deps | `plugdev deps add|remove|list` (+ TUI Dependencies) |99| Reload | Safe JAR reload (not `/reload`); optional `--hotswap` for method bodies |100| Folia | Prefer full restart over safe reload |101| Headless | `plugdev server start|stop|status|command|logs` + `--json` |102| MCP | `npx @plugdev/mcp` — structured tools for the same loop |103| Skill install | `npx skills add mattbaconz/plugdev --skill plugdev` |104| Docs | https://pluglabs.app/plugdev |