
Command
/datapack
Lists the world's data packs, turns them on or off, and can create a new empty one.
| /datapack create <id> <description> |
| /datapack disable <name> |
| /datapack enable <name> |
| /datapack enable <name> (after <existing>|before <existing>) |
| /datapack enable <name> (first|last) |
| /datapack list [(available|enabled)] |
| Argument | Kind of value | What to type |
|---|---|---|
| <id> | Text | For create: the folder name of the new pack. One word, or text in quotes. |
| <description> | Text component | For create: the pack description as a text component, for example "My first pack". |
| <name> | Text | The name of the pack to enable or disable, for example vanilla or "file/my_pack". One word, or text in quotes. |
| <existing> | Text | For before and after: the name of an enabled pack to place the new one next to. One word, or text in quotes. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled and multiplayer servers. list, enable, and disable need permission level 2 (gamemasters): server operators, players with cheats, command blocks, and functions can run them. create needs permission level 4 (owners), so command blocks and functions, which run at level 2, cannot use it. |
| Result | list reports the enabled and the available packs and returns how many it listed. enable and disable announce the pack, reload the world's data, and return the number of packs enabled afterwards. create reports the new pack's name and returns 1. |
| list | Shows both the enabled packs and the packs that are available but not enabled. Add "enabled" or "available" to show only one of the two lists. |
| enable | Turns a pack on and reloads all data packs. Without a position word, the pack goes where the pack itself asks to be placed. |
| Load order | first puts the pack at the start of the order and last at the end. before and after place it directly before or after another pack that is already enabled. |
| disable | Turns a pack off and reloads all data packs. |
| create | Makes a new empty data pack folder in the world's datapacks folder, containing a pack.mcmeta file with the description and an empty data folder. The pack is not enabled by this command. |
| Pack names | Use the names shown by /datapack list. Packs from the world's datapacks folder are named file/ followed by the folder or file name, and such names must be put in quotes. |
| Failure reasons | Fails for an unknown pack, a pack that is already enabled or already disabled, a pack that needs a feature that is not turned on in this world, and when trying to disable a pack that belongs to an enabled feature. create fails if the name contains characters that are not allowed or if a pack with that name already exists. |
/datapack listShows which data packs are enabled and which are available.
/datapack enable "file/my_pack"Enables the pack in the folder my_pack.
/datapack enable "file/my_pack" after vanillaEnables the pack and loads it right after the built-in vanilla pack.
/datapack disable "file/my_pack"Disables the pack.
/datapack create my_pack "My first pack"Creates a new empty data pack called my_pack.

