So... It appears I haven't quite gripped this concept yet.
I have this:
/give @a[x=-723,y=27,z=-369,dx=8,dy=8,dz=8] hotbar.0 minecraft:compass{display:{Name:"{\"text\":\"Magnet\",\"color\":\"gray\",\"bold\":true,\"italic\":false}",Lore:["While holding this, all items nearby will fly towards you!"]},HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1}]} 1
And I would like to execute a command (/say hi will do) at any player holding that particular item.
So... For further reference, when you're identifying someone holding this, do you HAVE to list every single aspect of it? (e.g. lore, enchantments, etc...). Because I've tried it without, and it doesn't appear to really work...
Thanks in advance!
Rollback Post to RevisionRollBack
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.
/give @a[x=-723,y=27,z=-369,dx=8,dy=8,dz=8] hotbar.0 minecraft:compass{[b]CustomTag:1b[/b],display:{Name:"{\"text\":\"Magnet\",\"color\":\"gray\",\"bold\":true,\"italic\":false}",Lore:["While holding this, all items nearby will fly towards you!"]},HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1}]} 1
Then execute when they hold it:
execute as @a[nbt={SelectedItem:{tag:{CustomTag:1b}}} run say Woah!
So... It appears I haven't quite gripped this concept yet.
I have this:
/give @a[x=-723,y=27,z=-369,dx=8,dy=8,dz=8] hotbar.0 minecraft:compass{display:{Name:"{\"text\":\"Magnet\",\"color\":\"gray\",\"bold\":true,\"italic\":false}",Lore:["While holding this, all items nearby will fly towards you!"]},HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1}]} 1
And I would like to execute a command (/say hi will do) at any player holding that particular item.
So... For further reference, when you're identifying someone holding this, do you HAVE to list every single aspect of it? (e.g. lore, enchantments, etc...). Because I've tried it without, and it doesn't appear to really work...
Thanks in advance!
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.
You could give it a custom tag
Then execute when they hold it:
==Links==
𝐒𝐞𝐜𝐨𝐧𝐝 𝐂𝐡𝐚𝐧𝐧𝐞𝐥- https://www.youtube.com/channel/UCQYroXqdZtYBnyspneetBGA/featured
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦- https://www.instagram.com/cowsdabest_yt/?hl=en
𝐓𝐰𝐢𝐭𝐭𝐞𝐫- https://twitter.com/cowsdabestyt
𝐃𝐢𝐬𝐜𝐨𝐫𝐝- https://discord.gg/H2NfhpQ
==DISCLAIMER!==
Please credit me if you are going to use it in a video or a map!
Hm... that command (the give one) doesn't seem to be valid...
and not just cause it's a /give command instead of /replaceitem...
For anyone who needs to know I grabbed the part from the 'minecraft:compass' all the way to the end. and it doesn't like it...
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.