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

Controls the loading/unloading of data packs.

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 ... <existing><existing> is not an existing enabled data pack
anyOn successDisable/enable/list data pack(s).

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