News
Game
Guides
Downloads
Versions
/datapack
COMMANDS COMMAND BLOCKS & MAPS CHEATS · LEVEL 2 4 SUBCOMMANDS Added in 1.14 or earlier

/datapack command in Minecraft

/datapack turns the data packs of a world on and off without leaving the game, changes their load order and lists what is available. It can also create a new, empty pack. Enabling or disabling a pack reloads the game data right away.

Syntax

/datapack create <id> <description>
/datapack disable <name>
/datapack enable <name> [after|before|first|last]
/datapack list [available|enabled]

// Exception: /datapack create needs level 4.

All 10 forms
  • /datapack create <id> <description>
  • /datapack disable <name>
  • /datapack enable <name>
  • /datapack enable <name> after <existing>
  • /datapack enable <name> before <existing>
  • /datapack enable <name> first
  • /datapack enable <name> last
  • /datapack list
  • /datapack list available
  • /datapack list enabled
/datapack createAdded in 1.21.6
/datapack create <id> <description>
ArgumentExpectsWhat it does
idTextquoted textName of the new pack, one word or in double quotes, for example my_pack.
descriptionJSON textDescription stored in the new pack, as a quoted string or a text component.
/datapack disable
/datapack disable <name>
ArgumentExpectsWhat it does
nameTextquoted textPack name as shown by datapack list, for example "file/my_pack" or vanilla. Quote names with a slash.
/datapack enable
/datapack enable <name> [after|before|first|last]
ArgumentExpectsWhat it does
nameTextquoted textPack name as shown by datapack list, for example "file/my_pack" or vanilla. Quote names with a slash.
existingoptionalTextquoted textEnabled pack used as reference: the new pack is placed just before or after it.
All 5 forms
  • /datapack enable <name>
  • /datapack enable <name> after <existing>
  • /datapack enable <name> before <existing>
  • /datapack enable <name> first
  • /datapack enable <name> last
/datapack list
/datapack list [available|enabled]
All 3 forms
  • /datapack list
  • /datapack list available
  • /datapack list enabled

Examples

List all data packs

/datapack list

Shows the enabled packs and those available but not enabled, with their exact names.

Java 26.3

Enable a pack with top priority

/datapack enable "file/my_pack" last

Enables the pack from the datapacks folder and puts it last, so it overrides the others.

Java 26.3

Load a fix after another pack

/datapack enable "file/fix_pack" after "file/my_pack"

Places fix_pack right after my_pack, so its files win over my_pack only.

Java 26.3

Disable a pack

/datapack disable "file/my_pack"

Turns the pack off and reloads the data without it. The files stay in the folder.

Java 26.3

Create an empty pack

/datapack create my_pack "My first pack"

Creates a new, empty data pack with this name and description, ready for your files.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

Pack names and order

datapack list shows every pack by name. Packs from the world's datapacks folder are called file/ plus the folder or zip name, so the name contains a slash and needs double quotes: datapack enable "file/my_pack". The built-in vanilla pack and feature packs such as trade_rebalance are listed too. Order matters: when two packs define the same file, the one enabled later wins. first and last move a pack to the lowest or highest priority, and before or after place it next to another pack. At world creation, the same choice is made with the Data Packs button.

Common errors

"Unknown data pack" usually means a typo or missing quotes. Experimental packs such as minecart_improvements or redstone_experiments only work if the matching option was turned on under Experiments when the world was created. Otherwise the game answers "Pack ... cannot be enabled, since required flags are not enabled in this world". A broken file inside a pack is skipped and reported in the game log, not in chat.

/reload rereads all enabled packs after you edit their files, and /function runs the functions they contain.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/datapack: FAQ

Why does /datapack enable say the pack is unknown?

The name must match the list exactly, including file/ and .zip for a zipped pack. Names with a slash need double quotes.

Do I need /reload after /datapack enable?

No, enabling or disabling a pack reloads the data by itself. Use /reload when you changed files inside a pack that is already enabled.

How do I use /datapack?

Type it in the chat with cheats on: /datapack disable <name>. Exception: /datapack create needs level 4.

Who can use /datapack?

Cheats on, or operator level 2. Exception: /datapack create needs level 4.

Related commands