How to detect a player right-clicking with an item? [duplicate]
![How to detect a player right-clicking with an item? [duplicate] - Free stock photo of adult, basketball, basketball player How to detect a player right-clicking with an item? [duplicate] - Free stock photo of adult, basketball, basketball player](/assets/images/how_to_detect_a_player_rightclicking_with_an_item_duplicate_0.jpeg)
I want to make a "lightning rod" in Minecraft. I'll have a stick or something that when right-clicked, it summons lightning one block in front of player.
How can I detect a player right-clicking with a specific item in hand?
Best Answer
Well..you could use a fishing rod,and test for the entity when you right click the rod. The fishing rod bobber is an entity which gets summoned when you right click the fishing rod. The bobber's entity name is "unknown". So just /testfor @e[type=Unknown] Normal items can't be tested for right click because they don't do anything. The only way to do it,it's to do it with plugins
Pictures about "How to detect a player right-clicking with an item? [duplicate]"
![How to detect a player right-clicking with an item? [duplicate] - Kids Playing Baseball How to detect a player right-clicking with an item? [duplicate] - Kids Playing Baseball](/assets/images/how_to_detect_a_player_rightclicking_with_an_item_duplicate_1.jpeg)
![How to detect a player right-clicking with an item? [duplicate] - Person Walking on Soccer Field How to detect a player right-clicking with an item? [duplicate] - Person Walking on Soccer Field](/assets/images/how_to_detect_a_player_rightclicking_with_an_item_duplicate_2.jpeg)
![How to detect a player right-clicking with an item? [duplicate] - Person in White Nike Soccer Shoes Standing on Black Floor How to detect a player right-clicking with an item? [duplicate] - Person in White Nike Soccer Shoes Standing on Black Floor](/assets/images/how_to_detect_a_player_rightclicking_with_an_item_duplicate_3.jpeg)
[Tutorial] How to detect RIGHT CLICKING with ANY ITEM in Minecraft
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Kampus Production, Mason McCall, Anastasia, cottonbro