Linked Questions

0
votes
2answers
10k views

How to assign a command to an item? [duplicate]

Does anybody know a way to add a command to an item (emerald, stick, other ingredients), then when left or right clicked, it executes a command?
3
votes
2answers
1k views

Is it possible to remove the Villager GUI and replace it with other right click abilities? [duplicate]

The title is a mouthful, I know, but basically my question is exactly what Wynncraft managed to do. When right-clicking a villager, you would normally open their trading GUI. However, is there a way ...
0
votes
1answer
2k views

Is there an simple way to grant specific players permissions by right clicking a item? [duplicate]

I'm working on a server where instead of buying ranks to get access to certain features such as nicknaming and and other donater features commonly found on most Minecraft servers, I'm hoping to add a ...
1
vote
1answer
2k views

How to detect a player right-clicking with an item? [duplicate]

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 ...
-3
votes
1answer
2k views

Are there methods to make an Iron Door open through right clicking while holding a specific item? [duplicate]

I want to know if one can open an iron door via right clicking, perhaps with a specific item in one's hand? Edit: Since 1.8, there is a "lock" command. Does this command work with buttons? Or is it ...
-1
votes
2answers
1k views

Show scoreboard points with right clicking an item [duplicate]

I have several scoreboards in an adventure map, so they can't all be shown in screen, and I want one particular scoreboard value to be shown in the chat when right clicking an item. For example, if I ...
-3
votes
1answer
971 views

How do I run a command when a player right clicks? [duplicate]

I want to assign an item to perform a specific command that will place down a redstone block at some coordinates when I right click it. How would I do this?
3
votes
1answer
645 views

Create a Minecraft Item that Executes a Command [duplicate]

I am using creative mode to tag Minecraft villagers as an adult or child. Here is the code I am using: /data merge entity @e[type=villager,limit=1,sort=nearest] {Tags:["child"]} /data merge entity @...
1
vote
1answer
327 views

How do I detect right clicks with commands? [duplicate]

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?
2
votes
1answer
111 views

Spawning mobs on Right Click with commands? [duplicate]

Is it possible to spawn a mob such as a skeleton in front of the player when they right click with an item such as a carrot on a stick?
-2
votes
1answer
92 views

Command activation by item [duplicate]

I would like to have an item (lets use a stick for example) to actiavte this command /effect (player name) 24 1000000 255 true upon right clicking. If anybody knows how to do that I'd be very ...
0
votes
0answers
46 views

How to detect a player's left-click [duplicate]

I'm writing a command for a customised enchantment that teleports a player holding a certain item to the direction that it's facing. However, according to my knowledge, there's no statistic in /...
0
votes
0answers
24 views

How do servers allow right-click events? [duplicate]

I am working on a minigame on my Spigot server and can't seem to find out how to make right-click events like servers do. For example, I want to be able to receive speed effects after right-clicking ...
8
votes
2answers
10k views

Detect when player attacks another player

I would like to detect when a player attacks/hits/hurts another player or entity. I have tried to use the AttackTime tag, but it doesn't work. Here is what I have tried (on a 20HZ clock): First ...