Promotion background
Halloween Season IS HERE!
10% off limited time offer!
limited time offer SAVE 10% NOW →

Guides

Should You Code Your Own Minecraft Duels Plugin?

A 1v1 command that teleports two players into an arena is a weekend project. A duels plugin you trust with your players' inventories is not.

Short answer: for friends on a private server, a simple duel command you write yourself is fine. For a live PvP or survival server where players bring their own gear, use an established duels plugin and build only your custom mode or reward on top of it.

Starting a match is easy. Ending it correctly, every time, for every player, is where home-made duels plugins lose people's items.

Who this is for

Small server owners who know some Java, or who plan to ask ChatGPT or Claude to write a duels plugin for them. Plenty of plugins are built that way now, and for a small, contained feature it can work well.

We sell a duels plugin, so keep that in mind. We have tried to be fair about when a free plugin or your own code is the better choice.

What a home-made duels plugin gets right

A first version can honestly cover a lot:

  • A /duel <player> request with a clickable accept message.
  • Teleporting both players to a fixed arena and back.
  • Giving a preset kit and clearing it afterwards.
  • A countdown, a winner message and a simple win counter.
  • Rules that match your server exactly, like no golden apples.

With two friends testing it, this works. The problems come with more players, more arenas and people who want to win at any cost.

What breaks on a live server

Getting inventories and locations back

Before a match you have to save each player's inventory, armour, off-hand, location, health, hunger, XP and potion effects. After the match you put all of it back. That has to work when they win, lose, quit, get kicked, time out or the server stops in the middle of a fight. If the snapshot lives only in memory, a crash wipes it. If the restore runs twice, you have a dupe.

Items leaking out of matches

Kit items are free, so players will try to take them home. They drop them for a friend outside the arena, throw an ender pearl over the wall, run /spawn or /home mid-fight, or die and leave the kit on the floor. Every exit path needs a rule, and kit items need a hidden tag so they can be found and removed.

Arenas that reset cleanly

Players place blocks, pour lava, light fires and blow things up. After each match the arena has to go back to how it was, including flowing water, dropped items and arrows stuck in walls. If you run several matches at once, you need several copies of each map and a way to give out a free one, and resetting a large area all at once can lag the server.

Parties, queues and spectators

Queues need to handle players leaving the queue, joining a second one or logging off while waiting. Parties add team damage and uneven teams. Spectators must not pick up items, open chests, block arrows or get hit, and they have to be restored the same way as fighters.

Folia and Bedrock players

On Folia every region runs on its own thread, so teleporting players between regions and resetting arena blocks has to go through region and entity schedulers. The normal Bukkit scheduler isn't available there. Bedrock players joining through Geyser see Java menus translated for their client, so kit and queue menus need testing on Bedrock too.

Every Minecraft update

Saved kits are items, and item data moved from NBT to data components in 1.20.5. Code that saved kits the old way loaded them wrong or not at all. Paper also changes its API on its own schedule, and combat details change between versions. Each release means retesting kits, restores and arena resets.

The pattern: a duels plugin that loses items once loses players' trust for good. These bugs rarely show up in a test with two people, and they always show up on a busy weekend.

Build it, free plugin or premium plugin

Build it yourself Free plugin Premium plugin
Time to start A weekend for 1v1, weeks for arenas, queues and parties An hour or two plus building arenas An hour or two plus building arenas
Cost Your time, plus any AI subscription Free One-off or recurring price
Maintenance Every Minecraft and Paper update is yours Depends on the volunteer maintainer The developer is paid to keep it updated
Risk on a live server High: lost or duplicated items Low to medium, widely used Low to medium, widely used
Fits your exact idea Fully Through config, sometimes an API Through config and usually an API

The middle path: build an add-on

What most owners want is one thing that is theirs: a mode with a special rule, rewards tied to their own ranks, a stat that feeds a leaderboard on their website. They don't want to own inventory restores and arena resets.

So keep those in a plugin that many servers already run, and write a small add-on that listens to its match start and end events or calls its API. Your code stays short and focused on your idea. If you use an AI tool to help write it, a small add-on is a much safer size of project than a full plugin.

Free starting points worth trying first:

  • Duels: free and open source (GPL-3.0), with a separate API module for developers. Check that its latest build supports your server version.
  • Phoenix Duels Lite: our free version, with limited modes, maps and party size. It has no developer API or add-ons; those are Premium only.

With Phoenix Duels, the API docs cover the Maven setup and events, custom add-ons shows how to package your own, and the developer page brings it together.

Where Phoenix Duels fits

Phoenix Duels is our premium duels plugin, with 1v1, party and FFA duels, arenas that regenerate after every match, kits, queues and betting. It runs on Spigot, Paper, Folia (experimental) for Minecraft 1.20.4 – 26.3. Player menus are built to work for Bedrock players through Geyser. It costs €19.99 one-time, lifetime updates.

These are the parts we spent the most time on, and the ones this article warns about:

  • Restoring every player's inventory and location after each match, even on disconnects
  • Running many matches at once in arenas that reset cleanly
  • Parties, queues and spectators without items leaking out of matches
  • Folia region threading and Bedrock menus
  • Keeping all of it working on every new Minecraft release

The honest downsides: it is paid and closed source, the API and every add-on need Premium, Folia support is still experimental, and some modes like Boxing, Spleef and TNT are paid add-ons. If you just want a 1v1 command for friends, a free plugin is enough.

Try it before you build anything

Phoenix Duels Lite is free and never contacts our servers.

Try Phoenix Duels Lite, free

Get Phoenix Duels Lite

Free to use. No account needed.

Version
v4.5.2
Last update
Download Phoenix Duels Lite

Get update emails Optional

Already have an account? Sign in

See Phoenix Duels

FAQ

Can ChatGPT or Claude write a Minecraft duels plugin?
It can write a working first version: a /duel command, an accept button, a teleport to an arena and a winner message. What it usually misses are the cases that only happen on a live server, like a player quitting mid-match, the server crashing during a fight, items leaking out of the arena, and arenas that need to reset while other matches are running.
What is the hardest part of a duels plugin?
Giving every player back exactly what they had before the match: inventory, armour, location, health, hunger, XP and potion effects. It has to work when they win, lose, disconnect, get kicked or the server stops halfway through. A mistake here either wipes a player's items or lets them keep kit items they should not have.
Is there a good free duels plugin?
Yes. Duels is free and open source under GPL-3.0 and includes a developer API. Phoenix Duels Lite is free with limited modes, maps and party size. Check that the version you pick supports your Minecraft version before you install it.
How do I add a custom game mode without writing a duels plugin?
Use an existing duels plugin for matches, arenas, queues and inventory restores, and write a small add-on that listens to its match events to add your rule, reward or mode. The Phoenix Duels API and add-ons need the Premium version.
Does Phoenix Duels support Folia?
Phoenix Duels runs on Folia, but Folia support is still marked as experimental. Test it on a staging server before you rely on it.

Phoenix Plugins Engineering Team

We build and maintain Phoenix Crates, Phoenix Duels, Phoenix Lobby and Phoenix Shop. This article comes from the bugs and support tickets we have handled while building them.

My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping