Comparison
Datapack vs plugin
Updated October 18, 2026
A datapack is a folder of JSON and .mcfunction files that vanilla Minecraft reads: recipes, loot, advancements and commands. A plugin is Java code that a Paper or Spigot server runs. Many ideas can be done both ways; the right choice depends on where it has to run and how complex the logic is.
An example that fits a datapack well.
Generate this with CodexeSide by side
| Datapack | Plugin | |
|---|---|---|
| Needs | Nothing: vanilla is enough | Paper, Spigot or a fork |
| Singleplayer | Yes | No |
| Written in | JSON and Minecraft commands | Java or Kotlin |
| Good at | Recipes, loot tables, advancements, tags, world generation, command mechanics | Commands with arguments, GUIs, economies, databases, events, permissions |
| Reacting to events | Limited: advancements, predicates and functions that run every tick | Hundreds of events: block break, chat, damage, inventory clicks and more |
| Storing data | Scoreboards and storage NBT in the world | Files, SQLite, MySQL, anything Java can use |
| Between versions | Formats change often; packs need updating | API is stable; many plugins keep working |
| Installed in | world/datapacks/ | plugins/ |
When a datapack is the better choice
- It must work in singleplayer or on a vanilla server, or players will share it as a world add-on.
- The idea is mostly data: new recipes, changed loot, an advancement tree, custom world generation.
- You want no server software at all and no Java build.
When a plugin is the better choice
- You need commands with arguments, permissions, GUIs or a shop.
- Data must be saved per player in a file or a database, or shared with a website or Discord.
- The logic reacts to many events, or would need many functions running every tick, which costs performance in a datapack.
- You use other plugins: Vault, LuckPerms, PlaceholderAPI, WorldGuard.
- If you want server logic without Java and without a build, there is a middle way: Skript.
Using both on one server
Paper and Spigot load datapacks from the world folder like vanilla, so you do not have to choose for the whole server. A common split: recipes, loot tables, advancements and world generation in a datapack, where they are plain data and easy to edit; commands, GUIs, economy and anything stored per player in a plugin. Keep in mind that a datapack belongs to one world, while a plugin applies to every world on the server.
Both on Codexe
Codexe makes both. A datapack is loaded on a real Minecraft server before it is Ready and the log is read for errors; a plugin is compiled. Both can be played on a private test server from your own game, and a datapack that changes world generation gets a server with a freshly generated world, so you see its terrain. Datapacks are test-loaded on versions from 1.20.1 to 26.3; plugins can target 1.8.8 to 26.3.
Questions
Can a datapack add new items?
Not truly new ones. It can give existing items custom names, components and models (with a resource pack), but not new behaviour beyond what commands allow.
Do datapacks work on Paper servers?
Yes. Paper loads datapacks from the world folder like vanilla, so you can use datapacks and plugins on the same server.
Which is faster?
For small things, both are fine. Heavy tick functions that check every player every tick cost more than a plugin listening to one event.
Can I turn a datapack into a plugin later?
Yes, by rewriting its logic in Java. Recipes, loot tables and advancements can even stay in a datapack next to the plugin, since Paper loads both.
Make it as a datapack or a plugin
This prompt opens ready to send:
“A datapack for Minecraft 1.21.4, namespace "hunt": an advancement tree "Monster Hunter" with 6 advancements for killing a zombie, a skeleton, a creeper, an enderman, a witch and the Ender Dragon, each giving XP, and a load function that adds a kills scoreboard.”
Generate this with Codexe