Granting an Advancement Using Commands
Understanding Minecraft Advancement Commands
Granting advancements in Minecraft using commands is a powerful tool for server administrators, map creators, and players looking to customize their gameplay experience. This method allows for precise control over player progress, enabling scenarios where specific achievements are unlocked instantly, or entire branches of the advancement tree are completed with a single command. Understanding the mechanics and proper syntax of the /advancement command is crucial for its effective use.
![]()
Prerequisites and Core Mechanics
Before diving into the specifics of the command, it’s essential to understand the fundamental requirements and how advancements function in Minecraft. To utilize the /advancement command, you must have cheats enabled in a single-player world. If you are on a multiplayer server, you will need to have an operator level of 2 or higher to execute these commands. This ensures that only authorized individuals can manipulate player progress.
Advancement progress is uniquely stored for each player and is saved per individual world. This means that any advancements granted or revoked in one world will not affect a player’s progress in another. The command offers significant flexibility, allowing you to grant or revoke a single advancement, a specific criterion within an advancement, an entire branch of an advancement tab, or even all advancements available in the game. When an advancement is successfully granted, the game typically triggers an in-game “toast” notification, which is the small pop-up in the corner of the screen indicating a new achievement. Additionally, a chat message will appear, provided that the announceAdvancements gamerule is set to true. It’s important to note that granting an advancement solely impacts the advancement progress itself; it does not bestow items, alter player statistics, or affect any other elements within the world. Recipe unlocks, which are integral to crafting progression, are also categorized as advancements and are thus influenced by this command.
Step-by-Step Guide to Granting Advancements
The process of granting an advancement begins with opening the chat interface in Minecraft, typically by pressing the ‘T’ key. Once the chat is open, you can input the command. The basic structure of the command is as follows:
/advancement grant <targets> <mode> <advancement_id> [criterion]
Let’s break down each component of this syntax:
1. Specifying Targets (<targets>)
The <targets> argument determines which player or players will receive the advancement. Minecraft offers several target selectors for this purpose:
@s: This targets the player executing the command. It’s useful for granting advancements to yourself quickly.@a: This targets all players currently online in the game. Use with caution, especially with commands that grant many advancements.- A specific player’s username: You can directly type a player’s exact username to grant the advancement only to them.
- Other target selectors like
@p(nearest player) and@r(random player) can also be used for more specific scenarios, though@s,@a, and usernames are most common for this command.
2. Choosing the Grant Mode (<mode>)
The <mode> argument dictates how the advancement(s) will be granted. This is a crucial part of the command, as it defines the scope of the operation. There are several modes to choose from:
only: This mode grants only the specified advancement. You can optionally include a specific criterion within that advancement to grant partial progress. This is the most precise mode.- Example:
/advancement grant @s only minecraft:story/shiny_gearwould grant only the “Shiny Gear” advancement to the command executor. - Example with criterion:
/advancement grant @s only minecraft:adventure/adventuring_time minecraft:desertwould grant only the “desert” criterion for the “Adventuring Time” advancement to the command executor, not the full advancement.
- Example:
from: This mode grants the specified advancement and all of its child advancements within the advancement tree. This is useful for completing an entire progression line starting from a certain point.- Example: If “A” is the parent of “B” and “C”, and “B” is the parent of “D”, then
/advancement grant @s from minecraft:advancement/Bwould grant “B” and “D”.
- Example: If “A” is the parent of “B” and “C”, and “B” is the parent of “D”, then
through: This mode grants the specified advancement, all of its parent advancements leading up to the root of the advancement tree, and all of its child advancements. This is a comprehensive way to complete an entire branch, including its lineage.- Example: Using the same structure,
/advancement grant @s through minecraft:advancement/Dwould grant “A”, “B”, “C” (if “C” is a child of “A” and “B” is a child of “A”), and “D”. This mode ensures all related advancements, both preceding and succeeding, are unlocked.
- Example: Using the same structure,
until: This mode grants the specified advancement and all of its parent advancements up to the root of the advancement tree. This is useful for ensuring all prerequisites for a specific advancement are met without granting subsequent achievements.- Example:
/advancement grant @s until minecraft:advancement/Dwould grant “A”, “B”, and “D”.
- Example:
everything: This powerful mode grants all advancements in the game to the specified target(s). Use with extreme caution, as it can be overwhelming for players and flood chat.- Example:
/advancement grant @a everythingwould unlock every single advancement for all players on the server.
- Example:
3. Providing the Advancement ID (<advancement_id>)
The <advancement_id> is the unique resource location of the advancement you wish to grant. These IDs follow a specific format, typically namespace:path/to/advancement. For most vanilla Minecraft advancements, the namespace is minecraft. For example, the ID for “A Terrible Fortress” is minecraft:nether/find_fortress. You must type this ID precisely for the command to work.
4. Specifying a Criterion ([criterion])
The [criterion] argument is optional and is primarily used with the only mode. Some advancements have multiple criteria that need to be met before the advancement is fully completed. By specifying a criterion, you can grant only a part of the advancement’s progress. For example, the “Adventuring Time” advancement requires visiting all biomes; each biome visited is a criterion.
- Example:
/advancement grant @s only minecraft:adventure/adventuring_time minecraft:desertgrants only the ‘desert’ criterion for the ‘Adventuring Time’ advancement.
Important Tips for Using Advancement Commands
- Flexible Player Targeting: Beyond
@sand@a, remember that target selectors like@p(nearest player) and@r(random player) can also be used for more dynamic targeting in complex command block setups. - Managing Chat Spam: When granting a large number of advancements, especially with the
everythingmode, the chat can become flooded with notifications. To prevent this, temporarily set the gameruleannounceAdvancementstofalseusing/gamerule announceAdvancements falsebefore executing the advancement command, and then set it back totrueafterwards. - World-Specific Saves: Always remember that advancements are saved per world. Granting them in one world will have no bearing on a player’s progress in another world or server.
- Re-triggering Rewards: If you need an advancement’s specific rewards or side-effects to re-trigger (e.g., for a custom command system that detects advancement completion), you must first revoke the advancement using
/advancement revokebefore granting it again. Simply granting an already-completed advancement will not re-trigger its effects. - Testing Player Advancements: You can check if a player has a specific advancement using the
/executecommand. For example,/execute as @a[advancements={minecraft:adventure/kill_a_mob=true}] run say I killed a mob!would make all players who have completed the “Kill a Mob” advancement say “I killed a mob!”. This is invaluable for creating custom events or conditional commands.
Common Mistakes to Avoid
To ensure smooth operation and prevent unexpected issues, be mindful of these common pitfalls:
- Missing Permissions: Forgetting to enable cheats in single-player or not having the required operator level 2 on a server will prevent the command from executing. Always verify your permissions first.
- Incorrect Advancement ID: The
advancement_idmust be typed precisely, including the namespace (e.g.,minecraft:) and the correct path. Typos or incorrect IDs will result in a “No such advancement” error. - Overusing
everythingMode: While convenient, usingeverythingmode without considering its implications can be detrimental. It grants all advancements, including all recipe unlocks, which can overwhelm the chat with notifications and flood the player’s recipe book, making it difficult to navigate. - Confusing Modes: Each mode (
from,through,until,only) has a distinct effect on which advancements are granted. Misunderstanding these differences can lead to unintended advancements being unlocked or desired ones remaining locked. Always double-check which mode is appropriate for your specific goal. - Attempting to Re-grant without Revoking: Granting an advancement that a player already possesses will not re-trigger any associated events or rewards. If you need to simulate a fresh completion, you must first use the
/advancement revokecommand to remove the advancement before granting it again. - Not Specifying a Criterion for Partial Progress: If an advancement has multiple criteria and you only intend to grant partial progress, you must specify the exact criterion using the
[criterion]argument with theonlymode. Failing to do so will attempt to grant the entire advancement, which might not be your intention.
By mastering the /advancement command and understanding its nuances, you can gain unparalleled control over player progression in your Minecraft worlds, enabling creative storytelling, customized challenges, and streamlined testing environments.