TransWikia.com

How can I detect when a player holds a tagged item? I just need to know the nbt for tagged items

Arqade Asked on September 27, 2021

My command is

execute at @a[ scores={fire_mage=1..},tag=mage:1b] run summon minecraft:fireball ^ ^1 ^1

However this command does not detect the tag and shows an error for tag.

One Answer

For holding, there's a tag named SelectedItem, and you can use it in /execute at @a[nbt={SelectedItem:{tag:{mage:1b}}}] run summon minecraft:fireball ^ ^1 ^1

Answered by RobertHunt on September 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP