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
.
- 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
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
, and0
-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
, and0
-9
) or a double-quoted string.
Result[]
Command | Trigger | Java Edition |
---|---|---|
any | the arguments are not specified correctly | Unparseable |
/datapack enable ... | <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 | |
any | Otherwise | Successful |
Output[]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
/datapack enable ... | On success | 1 | 1 | The number of packs that are loaded after executing. | |
/datapack list [available|enabled] | On success | 1 | 1 | the number of data packs that are listed |
History[]
Java Edition | |||||
---|---|---|---|---|---|
1.13 | 17w46a | Added /datapack . | |||
1.19.3 | 22w42a | Added feature flags. Data pack requiring feature flag that is not enabled cannot load by this command now. |