The /advancement and /recipe commands in Minecraft: give or take advancements and recipes
Advancements and the recipe book are earned by playing, but on a server you sometimes have to change them by hand: give someone back what they lost with a new world, reset everyone before an advancement race or open every recipe on a creative server. That's what /advancement and /recipe are for. Here's how they're written in today's Java version, what happens when you use them (including what you don't see coming) and how not to flood the chat.
Who can use them
Both need you to be an operator (level 2) or to have cheats on in a single-player world. On a server, you op yourself from the console with op YourName (the guide to giving op).
They only work on players: with @e or a mob they give an error. And only on players who are online: you can't give or take advancements or recipes from someone who isn't on the server.
From the server console they're written without the slash and always with the player: advancement grant Ana everything. The console isn't a player, so without a name it doesn't know who you mean.
Rather not set it up yourself? Minecraft servers from €6 a month, no contract and a full refund within 72 hours. Or create a free Minecraft server, no card needed.
/advancement: give and take advancements
The form is /advancement grant <players> <what> to give and /advancement revoke <players> <what> to take. The «what» part has five forms, and it's what confuses people most.
Each advancement has an ID with its tab in front: minecraft:story/mine_diamond is «Diamonds!», minecraft:story/enter_the_nether is «We Need to Go Deeper» and minecraft:end/kill_dragon is «Free the End». You don't need to know them by heart: type /advancement grant Ana only minecraft: and press Tab, and the game shows you the list.
everything: all of them
/advancement grant Ana everythinggives her every advancement in the game at once, hidden ones included./advancement revoke @a everythingresets everyone online to zero.only: just one
/advancement grant Ana only minecraft:story/mine_diamondgives her just that one. It's the one you use to give a specific advancement back to someone who lost it.until: up to that one
/advancement grant Ana until minecraft:story/enter_the_nethergives her that advancement and every earlier one in its branch, from «Minecraft» to «We Need to Go Deeper». It's what she'd have if she'd earned it by playing.from: from that one on
/advancement revoke Ana from minecraft:story/enter_the_nethertakes away that advancement and every one that comes after it in the tree, and leaves the earlier ones.through: the whole branch
throughisuntilandfromat once: the advancement, every one before it and every one after it in its branch.
Advancements with several parts: give one criterion
Some advancements are earned by adding things up: «A Balanced Diet» asks you to eat everything and «Monsters Hunted», to kill one of each monster. Each thing is a «criterion», and you can give or take just one with only and its name after it.
For example, /advancement grant Ana only minecraft:husbandry/balanced_diet apple ticks off the apple in «A Balanced Diet» without giving her the whole advancement. The game replies «Granted criterion 'apple' of advancement [A Balanced Diet] to Ana».
If the name doesn't exist, it replies «The advancement [...] does not contain the criterion '...'». Pressing Tab after the advancement's ID shows the ones it has.
What happens when you give every advancement (and how not to flood the chat)
Giving an advancement with the command is like earning it by playing, for better and for worse. It's announced in the chat for everyone («Ana has completed the challenge [Monsters Hunted]») and comes with its reward: challenges give experience, so with everything the player goes up a good handful of levels.
And there's more: the recipe book also works with hidden advancements, one per recipe, so /advancement grant Ana everything also unlocks every recipe for her. If you only wanted the recipes, /recipe is better (below).
So that everything doesn't leave hundreds of messages in the chat, turn the announcement off first with gamerule show_advancement_messages false and back on afterwards with true. It's been called that since 1.21.11; before, it was announceAdvancements (the others that changed are in the gamerules guide).
Taking advancements doesn't undo the rewards: revoke doesn't take away the experience gained or the recipes learned. To take recipes away there's /recipe take.
/recipe: unlock or take recipes
The form is /recipe give <players> <recipe> to unlock and /recipe take <players> <recipe> to take away. Instead of a recipe you can put *, which is all of them.
Every recipe for everyone
/recipe give @a *opens the whole recipe book for everyone online. The game replies «Unlocked ... recipe(s) for ... players». It's handy on creative servers or for someone starting out who doesn't know what to craft.One recipe
/recipe give Ana minecraft:diamond_swordunlocks just the diamond sword for her. The recipe's ID is usually the item's, but not always: one item can have several recipes (red_dye_from_beetroot, red dye made from beetroot). Press Tab to see the list.Taking them away
/recipe take @a *empties everyone's recipe book. If someone already had none, it replies «No recipes could be forgotten»; if they already had them all when you give them, «No new recipes were learned». It's not a bug: there was nothing to change.
Recipes you have to earn: limited_crafting
Normally the recipe book only helps: you can craft anything even if it isn't in it. With gamerule limited_crafting true (before, doLimitedCrafting), each player can only craft what they've unlocked.
Watch what you expect from that rule: recipes still unlock on their own when you pick up the materials (that's what those hidden advancements do), so limited_crafting on its own changes little in a normal game. Where it shines is in maps and progression servers: you take the recipes away with /recipe take @a * and hand them out with /recipe give as the reward for a quest, a shop or a command block (the command blocks guide).
So they don't unlock on their own either, Paper lets you disable advancements in spigot.yml, under advancements.disabled: a single ID, a whole namespace or * for all of them. With * no advancement is left, not even the hidden recipe ones, so only someone who gets a /recipe give will have them. It takes effect when you restart the server.
Real uses on a server
A new world without losing advancements
If you reset the world and someone asks for theirs,
untilwith their last advancement in each branch gives them back in order. To see what they had, look at the old world's backup before deleting it (the guide to resetting the world).Advancement race
Before you start,
/advancement revoke @a everythingand everyone starts from zero; whoever gets the one you agree on first wins. Everyone sees it in the chat, withshow_advancement_messageson.Creative server
/recipe give @a *from the console when someone new joins, or in a repeating command block, and nobody has to look up recipes.Testing an advancements datapack
Datapacks that add their own advancements bring their ID with their namespace in front; with
onlyandrevokeyou test one without remaking the world (the datapacks guide).
If you have EssentialsX
EssentialsX brings its own /recipe, which shows how an item is crafted, and it takes the name. That's why, with EssentialsX, /recipe give @a * gives a usage error instead of unlocking anything.
To use the game's one, type its prefix: /minecraft:recipe give @a * (in the console, minecraft:recipe give Ana *). /advancement doesn't have that problem: EssentialsX doesn't bring one with that name.
On NapNodes
Minecraft servers run on Paper with the latest version, so everything in this guide works. From the panel's «Console» you run any of these commands without being connected (but with the player online).
The guide's two rules are in «Settings» → «Game rules» as «Announce advancements» and «Require recipe for crafting», with the server running. And you open spigot.yml in «Files».
Before a revoke on everyone on a paid server, make a backup in «Backups»: each player's advancements are saved with the world, so if you get it wrong, you go back to how it was. The free server has no backups.
Frequently asked questions
What's the command to get every advancement in Minecraft?
/advancement grant YourName everything. Turn off the chat announcement first with gamerule show_advancement_messages false, or hundreds of messages will appear.
How do I unlock every recipe with a command?
With /recipe give @a *, which opens them for everyone online. For a single player, swap @a for their name.
How do I take every advancement from a player?
With /advancement revoke and their name, followed by everything. It doesn't take away the experience gained or the recipes learned; recipes are taken with /recipe take.
Does giving advancements with the command give experience?
Yes. It's like earning them by playing: challenges bring their experience and the advancement is announced in the chat if the show_advancement_messages rule is on.
Why doesn't /recipe work on my server?
You probably have EssentialsX, which uses /recipe to show how something is crafted. Type /minecraft:recipe to use the game's one.
Can you give advancements to a player who isn't online?
Not with these commands: they only work on players on the server. Wait for them to join or do it as soon as they connect.
Shall we set it up for you?
Minecraft servers from €6 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Minecraft server, no card needed.
Your server doesn't show up in the game? Check it in a second with “Is my Minecraft server online?”: players, version and MOTD, free. Need a player's UUID for the whitelist or permissions? Look it up here. Handing out enchanted items? Build the command with the /give generator.
Free tool: Gamerules generator. Pick the rules and copy the commands, or paste old ones (keepInventory, doFireTick…) and convert them to the 1.21.11 names.
Free tool: Minecraft recipe generator. Custom crafting recipes for your Minecraft server without mods: put the ingredients on the table and download the datapack for your version.
Keep reading
- The /xp Command in Minecraft: Give, Take and Set Experience Levels
How to use /xp (or /experience) in Minecraft and on your server: give levels or points, take them away, set them and why «set points» fails. Points table.
- The /effect Command in Minecraft: Give Effects, Make Them Infinite and Clear Them
How to use /effect in Minecraft: infinite night vision, speed or strength at any level, no particles, clearing effects and the list of all 41 effect IDs.
- Change your name on a Minecraft server: /nick, colours and prefixes
How to set nicknames with /nick (EssentialsX), coloured names and prefixes with /team on your Minecraft server, and what happens when you rename your account.