August 26, 2026 · The Minely team
How to make a duels plugin with AI (1v1s, ranked, rematches)
Duels are Minecraft's purest PvP: two players, one arena, no excuses. The plugin is an invite flow, a kit system, and a rating engine — and the rating is what turns casual 1v1s into a ladder people grind for months.
What a duels plugin actually is
A duels plugin lets players challenge each other to 1v1 matches with a chosen kit in a private arena. Casual duels track wins and losses; ranked duels use an Elo-style rating to match players of similar skill and publish a ladder.
How it works under the hood
The flow: /duel <player> sends an invite with a kit pick; accepting teleports both to a free arena with the kit applied. The match ends on a death, with win/loss recorded per player and, for ranked, a rating adjustment computed from the rating difference. The matchmaker keeps a queue of waiting players and pairs the closest ratings. Arena assignment reuses the arena state machine with tiny 1v1 maps.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
a duels plugin with /duel invite, kit pick, ranked matchmaking with Elo rating, win-loss tracking per player, and a rematch button
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Implement the invite flow with kit selection and expiry.
- Build arena assignment and the kit application.
- Record wins and losses with a stats command.
- Add Elo rating with the ranked queue and matchmaking.
- Polish with rematches, spectate-off rules, and a ladder.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
K standard of 24 to 32 for Elo keeps ratings meaningful without wild swings. Seed new players at a base rating with a few placement games. Rematch limits (one per match) prevent rating farming between friends.
Tips that save you a rebuild
- Expire invites after 30 seconds; stale invites cause weird double-matches.
- Give every kit a counter-kit and watch pick rates weekly.
- Rate-limit rematches to stop friend-farming the ladder.
- Log rating deltas per match; a broken curve is invisible without them.
Questions people ask
Can I have unranked only?
Yes — the rating layer is optional; casual duels with stats work standalone.
What about team duels?
2v2 and 3v3 with shared ratings are a natural extension of the same engine.
How do I stop kit-choosing stalemates?
Random-kit mode, or a kit ban phase like competitive games use.
Open the dashboard, paste the prompt from this guide, and watch it build live. The first one is free, and the source is yours either way.
