Hi Gamepedia users and contributors! Please complete this survey to help us learn how to better meet your needs in the future. We have one for editors and readers. This should only take about 7 minutes!

Commands/advancement

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

Operator

First introduced

Java Edition 1.12 (Java Edition 17w13a)

Gives or takes an advancement from one or more players.

Syntax
advancement (grant|revoke) <targets> everything
advancement (grant|revoke) <targets> only <advancement> [<criterion>]
advancement (grant|revoke) <targets> (from|through|until) <advancement>
Arguments
(grant|revoke)
Specify whether to add or remove the to-be-specified advancement(s).
<targets>
Specify one player or more, using a target selector.
(everything|from|only|through|until)
everything
Specify all loaded advancements for addition/removal.
from
Specify an advancement and all its children advancements for addition/removal.
Think of specifying everything from that advancement to the end.
The exact order the operation is carried out in is specified advancement > child > child's child > ... When it operates on a child that branches, it iterates through all its children before continuing.
only
Specifying a single advancement for addition/removal.
through
Specify an advancement, all its parent advancements, and all its children advancements for addition/removal.
Think of specifying everything through the specified advancement, going both backwards and forwards.
The exact order the operation is as if the command were executed with "until" specified, then with "from" specified: parent > parent's parent > ... > root > specified advancement > child > child's child > ...
until
Specify an advancement and all its parent advancements until the root for addition/removal.
Think of specifying everything from the start until that advancement.
The exact order the operation is carried out in is parent > parent's parent > ... > root > specified advancement.
<advancement>
A valid advancement identifier; specifies which advancement to target.
[<criterion>] (optional)
A valid advancement criterion identifier; specifies which criterion of the advancement to manipulate.
This defaults to the entire advancement.
If specified, the command refers to merely the criterion and not the entire advancement.
Result
On success, grants or removes the specified advancement(s) to the player(s).
Fails if the arguments are invalid or if <targets> fails to resolve to one or more online players.
Examples
To grant the "Cover Me With Diamonds!" advancement to yourself, execute /advancement grant @p only minecraft:story/shiny_gear.

History[edit]

Java Edition
1.1217w13aAdded /advancement.
1.1317w45aRemoved /advancement test in favor of advancement target selectors.

See also[edit]

/gamerule announceAdvancements