Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/datapack

Command

/datapack

Lists the world's data packs, turns them on or off, and can create a new empty one.

Syntax

/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)]

Arguments

ArgumentKind of valueWhat to type
<id>TextFor create: the folder name of the new pack. One word, or text in quotes.
<description>Text componentFor create: the pack description as a text component, for example "My first pack".
<name>TextThe name of the pack to enable or disable, for example vanilla or "file/my_pack". One word, or text in quotes.
<existing>TextFor before and after: the name of an enabled pack to place the new one next to. One word, or text in quotes.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inSingleplayer 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.
Resultlist 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.
listShows 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.
enableTurns a pack on and reloads all data packs. Without a position word, the pack goes where the pack itself asks to be placed.
Load orderfirst 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.
disableTurns a pack off and reloads all data packs.
createMakes 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 namesUse 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 reasonsFails 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.

Examples

/datapack list

Shows 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 vanilla

Enables 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.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)