1

I've tried for some time to fix my problem alone, but now i need some help ! ( 1.16.4 version ) I am making server with friends using custom items and powers related to them, in this example it's a wand of levitation. So here's the command that I've used :

execute if entity @a[nbt={SelectedItem:{id:"minecraft:stick",tag:{display:{Name:'[{"text":"WAND OF LEVITATION","color":"gold","bold":true},{"text":"","color":"gold","bold":false}]'}}}}] run effect give @s minecraft:levitation 1 3 true

This isn't showing me any error, just not applying the levitation effect. why ? Command block on Repeat-Unconditional-Always active Here is the Item

2
  • 5
    This other problem is the only thing that I can see. Please read it carefully. Why is it bad practice to test for item names?
    – One 2 Many
    May 11, 2021 at 22:44
  • Yup, as ExpertCoder14 said, it is not good to test for item names. Try adding custom NBT tags and test for those instead.
    – kusobito
    May 12, 2021 at 12:43

0

Browse other questions tagged .