/datapack

Jump to navigation Jump to search
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.

If a build-in datapack in the path of datapacks in the vanilla datapack is enabled during world creating, it cannot be disabled by this command.

Syntax[edit | edit source]

datapack disable <name>
Disable the specified pack.
datapack enable <name>
Load 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 | edit source]

<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 quoted string (by " or ' ).

<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 quoted string (by " or ' ).

Result[edit | edit source]

CommandTriggerJava Edition
AnyThe command is incomplete, or any argument is 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[edit | edit source]

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

[hide]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.
1.20.524w11a/datapack disable doesn't work in this snapshot.[1]
24w12aIf a built-in datapack in the path of datapacks in the vanilla datapack folder is enabled during world creation, it can no longer be disabled by this command.

References[edit | edit source]

  1. MC-269373 — resolved as "fixed".

Navigation[edit | edit source]