Arqade Asked on July 6, 2021
Are there any commands that can test for a player holding at least 3 arrows in his main hand?
Well, you could give a tag to te player if they hold an arrow, and remove the tag if they hold only one or two arrows.
/scoreboard players tag @a add HoldsArrows {SelectedItem:{id:"minecraft:arrow"}} /scoreboard players tag @a[tag=HoldsArrows] remove HoldsArrows {SelectedItem:{id:"minecraft:arrow",Count:1b}} /scoreboard players tag @a[tag=HoldsArrows] remove HoldsArrows {SelectedItem:{id:"minecraft:arrow",Count:2b}}
Answered by Aeldrion on July 6, 2021
/scoreboard players tag
has been replaced with /tag
.1.13+ commands:
/scoreboard players tag @a add HoldsArrows {SelectedItem:{id:"minecraft:arrow"}}
/scoreboard players tag @a[tag=HoldsArrows] remove HoldsArrows {SelectedItem:{id:"minecraft:arrow",Count:1b}}
/scoreboard players tag @a[tag=HoldsArrows] remove HoldsArrows {SelectedItem:{id:"minecraft:arrow",Count:2b}}
Answered by ExpertCoder14 on July 6, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP