1

Yet another command question

Juisaderp 4/8/21 12:15 pm history
77
4/11/2021 8:09 pm
So I'm working on a 1.16.5 PVP server and there is a feature I'm trying to implement. That is, when you right click an item (any item like blue dye or something), it runs the /playsound command and plays the sound on your position, kind of like a taunt but with any sound in minecraft. Is there any way to do this? Do not care if it is spammable or not.
Posted by
Juisaderp
Level 39 : Artisan Nerd
21

  Have something to say?

JoinSign in

2

HoboMaggot
04/08/2021 10:38 pm
Level 55 : Grandmaster Blob
If you're ok with using a custom texture pack, you can use a carrot on a stick to detect if the player is right clicking and then execute the sound command.
Otherwise you'll need to use an invisible villager that constantly teleports to in front of your face and detecting if the player "talks" to them, for which you can execute the command.

Both ways are detected using a scoreboard
Actually this way is better, and is offhand friendly
1
Juisaderp
04/11/2021 8:09 pm
Level 39 : Artisan Nerd
Thanks a lot!
1

Welcome