Commands/advancement

Gives or takes an advancement from a player, or tests whether a player has an advancement.


 * Syntax




 * Arguments


 * player
 * Must be a player name or a target selector.


 * Grants/revokes only the specified advancement from the player.
 * Grants/revokes only the specified advancement from the player.


 * Grants/revokes the specified advancement, its parent advancement, its parent's parent advancement, etc. from the player. From the start until the specified advancement. The exact order of granting/revoking is "parent" > "parent's parent" > ... > "start" > "specified advancement".
 * Grants/revokes the specified advancement, its parent advancement, its parent's parent advancement, etc. from the player. From the start until the specified advancement. The exact order of granting/revoking is "parent" > "parent's parent" > ... > "start" > "specified advancement".


 * Grants/revokes the specified advancement, its children advancements, its children's children advancements, etc. from the player. All the way forward from the specified advancement. The exact order of granting/revoking is "specified advancement" > "child" > "child's child", when a branch is found it will iterate through the top branch entirely before going through the other branches. Because the order of branches depends on how the operating system reads the files, this order will be inconsistent across different operating systems.
 * Grants/revokes the specified advancement, its children advancements, its children's children advancements, etc. from the player. All the way forward from the specified advancement. The exact order of granting/revoking is "specified advancement" > "child" > "child's child", when a branch is found it will iterate through the top branch entirely before going through the other branches. Because the order of branches depends on how the operating system reads the files, this order will be inconsistent across different operating systems.


 * Acts as  and   combined; all advancements through the specified advancement, going both backwards and forwards. The exact order of granting/revoking is the same as for   and ,   being done before.
 * Acts as  and   combined; all advancements through the specified advancement, going both backwards and forwards. The exact order of granting/revoking is the same as for   and ,   being done before.


 * Grants/revokes every loaded advancement from the player.
 * Grants/revokes every loaded advancement from the player.


 * advancement
 * Specifies which advancement to grant, revoke or test. Must be a valid advancement identifier.


 * criterion (optional)
 * Specifies which criterion of the advancement to grant, revoke or test. Must be a valid advancement criteria identifier.
 * If specified, the command will refer to merely the criterion, and not the entire advancement.
 * If absent, the command will refer to the entire advancement.


 * Result


 * Fails if the arguments aren't specified correctly, or if player fails to resolve to one or more online players.


 * On success, grants or removes the specified advancement(s) to the player(s).


 * Examples


 * To test yourself for the "iron leggings" criterion of the "Obtain armor" advancement:


 * To grant the "Shiny gear" advancement to yourself: 命令/advancement