Minecraft Wiki
Advertisement
Information icon
This feature is exclusive to Java Edition. 

Controls the loading/unloading of data packs.

Note that feature flags can be enabled through data pack only when creating the world. Data packs requiring a feature flag that is not enabled cannot be loaded by this command.

Syntax[]

datapack disable <name>
datapack enable <name>
Enable the specified pack.
datapack enable <name> (first|last)
Load this pack before (lowest priority) or after (highest priority) all others (lowest or highest priority).
datapack enable <name> (before|after) <existing>
Load this pack just before (lower priority) or after (higher priority) an existing pack.
datapack list [available|enabled]
List all data packs, or list only the available/enabled ones. Hovering over the data packs in the chat output shows their description defined in their pack.mcmeta.

Arguments[]

<name>: string

Specifies the name of the data pack.
Must be a string. And it must be a quotable phrase, which is either a single word (allowed characters: -, +, ., _, A-Z, a-z, and 0-9) or a double-quoted string.

<existing>: string

Specifies the name of an existing enabled data pack.
Must be a string. And it must be a quotable phrase, which is either a single word (allowed characters: -, +, ., _, A-Z, a-z, and 0-9) or a double-quoted string.

Result[]

CommandTriggerJava Edition
anythe arguments are not specified correctly Unparseable
/datapack enable ...
/datapack disable ...
<name> is not a valid data pack Failed
the data pack has already been enabled/disabled
/datapack enable <name> ...pack <name> requires enabling a feature flag that is not enabled via data pack when creating world
/datapack enable ... <existing><existing> is not an existing enabled data pack
anyOtherwiseSuccessful

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
/datapack enable ...
/datapack disable ...
On success11The number of packs that are loaded after executing.
/datapack list [available|enabled]On success11the number of data packs that are listed

History[]

Java Edition
1.1317w46aAdded /datapack.
1.19.322w42aAdded feature flags. Data pack requiring feature flag that is not enabled cannot load by this command now.
Advertisement