2

Checking player advancement

User4122499G 4/14/22 3:35 am
761
4/19/2022 3:55 am
I don't understand how to check this via /execute.
Posted by
User4122499G
Level 1 : New Miner
0

  Have something to say?

JoinSign in

1

Kefaku
04/19/2022 3:55 am
Level 45 : Master Nerd
You can use the advancements=[namespace:advancement=true] to check whether someone has an advancement.
For example, to check whether a player has the "Adventuring Time" advancement you could use:

/execute if entity @p[advancements={minecraft:adventure/adventuring_time=true}]

Of course you can also add multiple advancements to the condition, by just listing them with commas.
By checking for advancements=[namespace:advancement=false] instead, you can check whether the player DOES NOT have the specified advancement:

/execute if entity @p[advancements={minecraft:adventure/adventuring_time=false}]
1

Welcome