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

Guides

Should You Code Your Own Minecraft Crates Plugin?

You can get a working crate out of an afternoon and an AI coding tool. Whether you should run it on a live server is a different question.

Short answer: for a small test server or a private server with friends, a basic crate you build yourself is fine. For a live server with an economy or a store, use an established crates plugin and only build the extra pieces you need on top of it.

The basics are easy. What takes years to get right is handing out each reward exactly once, surviving crashes and full inventories, and keeping it all working on every Minecraft update.

Who this is for

This is for owners of small and mid-sized servers who can read a bit of Java, or who have a ChatGPT or Claude subscription and are thinking of asking it for a crates plugin. A lot of people build plugins that way now, and for some jobs it works well.

We sell a crates plugin, so we have a bias. We have tried to write this the way we would explain it to a friend, including when a free plugin or your own code is the better choice.

What a home-made crates plugin gets right

Give yourself some credit here. A first version can do a lot:

  • A chest menu that shows the possible rewards.
  • Weighted random rewards with commands, items or money.
  • A simple key item and a block players right-click to open.
  • A short spin animation that cycles items in the menu.
  • Exactly the rewards and messages your server wants, with nothing extra.

On a test server with two players, this will look finished. That is the trap: the problems below don't show up until real players, real lag and real money are involved.

What breaks on a live server

Rewards that get duplicated or lost

Most crate exploits come from the gap between taking the key and giving the reward. Players spam-click, shift-click, press number keys or double-click to collect items from the menu. They close the menu or disconnect during the animation. If any of those paths runs the reward twice, or skips it, you have a dupe or an angry ticket.

The same goes for full inventories. A reward that is added to a full inventory is either dropped on the floor, silently deleted, or has to be stored and given later. Each choice needs code and testing.

Crashes in the middle of an opening

If the server stops after the key is taken but before the reward is saved, the player loses both. Getting this right means writing the result before the animation starts and finishing it on the next join. Database writes also have to happen off the main thread, or every opening adds lag, and then you have to handle the write that hasn't finished yet when the player logs out.

Keys that can be faked

A key checked by its name or lore can be copied with an anvil or a renamed item. Physical keys also end up in crafting grids, hoppers and item frames. Keys need a hidden tag (persistent data) and checks in all of those places.

Animations that lag the server

Spawning real entities or editing blocks for every opening is cheap with one player and expensive with fifty opening at once during a sale. Animations that use packets only exist on each viewer's client, which keeps the server light, but they are much harder to write and break more often between versions.

Folia and Bedrock players

Folia runs each region of the world on its own thread. The normal Bukkit scheduler doesn't work there, so code has to use region and entity schedulers, and touching a block or player from the wrong thread throws errors. Bedrock players joining through Geyser see Java chest menus translated for their client, and some click types and item displays don't come across the same way.

Every Minecraft update

In 1.20.5 item data moved from NBT to data components, which broke a lot of code that read or saved items. Paper now changes its API on its own schedule and deprecates methods most releases. Each update means retesting rewards, keys and menus, and somebody has to do it the week the update comes out.

The common thread: none of these show up in a quick test. They appear when a busy server is lagging, a player is trying to break things, or a new version just came out. That is also when you have the least time to debug.

Build it, free plugin or premium plugin

Build it yourself Free plugin Premium plugin
Time to start Days for a basic version, weeks to harden it An hour or two to set up An hour or two to set up
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 until it has seen real players 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

Most people who want to build their own crates plugin don't actually want to rebuild keys, rewards and animations. They want one thing that no plugin has: a reward that ties into their custom skills plugin, a seasonal crate with a special rule, a Discord message when someone wins something rare.

You can get that without owning the whole plugin. Run an established crates plugin and write a small add-on that listens to its events or calls its API. Your code stays small, and the risky parts (keys, rewards, saving, animations) stay in a plugin that many other servers already run and test. This is also a good size of project if you are using an AI tool to help you write it.

Free starting points worth trying first:

  • Crazy Crates: free and open source (MIT), and lists Paper, Spigot, Purpur and Folia support on Modrinth.
  • Excellent Crates: free and open source (GPL-3.0), with a developer API for custom animations and features.
  • Phoenix Crates Lite: our free version, up to 5 crates, with the in-game editor. It has no developer API; that is Premium only.

If you go with Phoenix Crates, the API docs cover the Maven setup and events, custom add-ons shows how to package your own, and the developer page collects everything in one place.

Where Phoenix Crates fits

Phoenix Crates is our premium crates plugin. It runs on Spigot, Paper, Folia for Minecraft 1.20.4 – 26.3. Bedrock players through Geyser get menus built for Bedrock. It costs €19.99 one-time, lifetime updates.

The parts on this page that take the longest to build yourself are the ones we have spent the most time on:

  • Lag-free packet animations that run for every viewer at once
  • Rewards that are never lost or duplicated, even on crashes and full inventories
  • Folia region threading and Bedrock menus
  • Migrating existing crates and keys from another plugin
  • Keeping all of it working on every new Minecraft release

The honest downsides: it is paid and closed source, the developer API and add-ons need Premium, and Premium checks its licence when the server starts. If you only need a couple of simple crates, a free plugin will do the job.

Try it before you build anything

Phoenix Crates Lite is free, runs offline and needs no licence.

Try Phoenix Crates Lite, free

Get Phoenix Crates Lite

Free to use. No account needed.

Version
v6.8.0
Last update
Download Phoenix Crates Lite

Get update emails Optional

Already have an account? Sign in

See Phoenix Crates

FAQ

Can ChatGPT or Claude write a working Minecraft crates plugin?
Yes, for the basics. A chest GUI, a weighted random reward and a key item are well within what an AI coding tool can produce, and it will usually compile and run on a test server. The trouble starts with the parts you only notice on a busy live server: duplicated or lost rewards, crashes in the middle of an opening, Folia threading and changes in new Minecraft versions.
What is the hardest part of a crates plugin to get right?
Making sure a reward is given exactly once. The key has to be taken and the reward handed out as one safe step, even if the player closes the menu, disconnects, has a full inventory or the server crashes halfway through the animation. Most crate dupes come from getting this wrong.
Is a free crates plugin good enough?
For many servers, yes. Crazy Crates and Excellent Crates are free and open source, and Phoenix Crates Lite is free with up to 5 crates. Try a free plugin before you write your own or pay for one.
How do I add a custom feature without writing a whole crates plugin?
Run an existing crates plugin and write a small add-on that hooks into its API or events. You keep the tested key, reward and animation code and only maintain the piece that is unique to your server. The Phoenix Crates API is available in the Premium version.
Do crate plugins break when Minecraft updates?
They can. Item data moved from NBT to data components in 1.20.5, Paper changes its API between releases, and menus and packets change too. A maintained plugin ships an update for each release; a home-made one needs you to do that work yourself.

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 dealt with since Phoenix Crates launched in 2022.

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