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 (17w13a)

Gives or takes an advancement from one or more players.

Syntax[edit]

advancement (grant|revoke) <targets> everything
advancement (grant|revoke) <targets> only <advancement> [<criterion>]
advancement (grant|revoke) <targets> (from|through|until) <advancement>

Arguments[edit]

(grant|revoke)

Specify whether to add or remove the to-be-specified advancement(s).

<targets>

Specify one player or more. Must be a player name or a target selector.
Entities other than players are not allowed.

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

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

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

  • To grant the "Cover Me With Diamonds!" advancement to player Steve, execute /advancement grant Steve only minecraft:story/shiny_gear.
  • To grant the all advancements to every player, execute /advancement grant @a everything.

History[edit]

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

See also[edit]