How do I detect right clicks with commands? [duplicate]
//ads -- adsterra.com -- native banner
?>
As the title says, I would like detecting right clicks. I have already tried spawning a slime that teleports to the player's head but I don't know how I would build the syntax. How can I do this?
Best Answer
Well, you could use the scoreboard objectives for stat.useItem. You would have to have a test for command block and objective for every item that the player would use to left click, however.
Pictures about "How do I detect right clicks with commands? [duplicate]"
![How do I detect right clicks with commands? [duplicate] - Crop faceless person showing paper with i can t breath inscription during Black Lives Matter movement demonstration How do I detect right clicks with commands? [duplicate] - Crop faceless person showing paper with i can t breath inscription during Black Lives Matter movement demonstration](/assets/images/how_do_i_detect_right_clicks_with_commands_duplicate_1.jpeg)
![How do I detect right clicks with commands? [duplicate] - From above of face mask on blackboard with I Cant Breathe title during COVID 19 pandemic How do I detect right clicks with commands? [duplicate] - From above of face mask on blackboard with I Cant Breathe title during COVID 19 pandemic](/assets/images/how_do_i_detect_right_clicks_with_commands_duplicate_2.jpeg)
![How do I detect right clicks with commands? [duplicate] - Free stock photo of acab, activism, adult How do I detect right clicks with commands? [duplicate] - Free stock photo of acab, activism, adult](/assets/images/how_do_i_detect_right_clicks_with_commands_duplicate_3.jpeg)
Right Click Detection in Vanilla Minecraft [1.16 Command Blocks]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Brett Sayles, Kelly, Brett Sayles, RODNAE Productions
