Commands/datapack

From Minecraft Wiki
Jump to: navigation, search
Information icon.svg
This feature is exclusive to Java Edition.
datapack
Restrictions

Operator

Controls the loading/unloading of data packs.

Syntax[edit]

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[edit]

<name>: string

Must be a string. And it must be a quotable phrase (either single word or quoted string).
Specifies the name of the data pack.

<existing>: string

Must be a string. And it must be a quotable phrase (either single word or quoted string).
Specifies the name of an existing enabled data pack.

Result[edit]

CommandTriggerJava Edition
anythe arguments are not specified correctly Unparseable
/datapack enable ...
/datapack disable ...
if <name> is not a valid data pack Failed
if the data pack have already been enabled/disabled
/datapack enable ... <existing>if <existing> is not an existing enabled data pack
anyOn successDisable/enable/list datapack(s).

Output[edit]

CommandEditionSituationSuccess Count/execute store succeess .../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[edit]

Java Edition
1.1317w46aAdded /datapack.