Published on March 06, 2022 (Updated on November 30, 2022)

[1.19.40] Run Command on Item Use

With RCoTu (Run Command on Item use) you can run ANY Command if a Player use (right click/hold down/...) a specific Item.Example:If a Player uses a Compass then the Player is teleported to the Spawn.

Select version for changelog:

Changelog
  • Updated to 1.19.50
  • Players get now the itemUseOn:item_id Tag if the Player clicks on a Block
  • Players get now the Tag itemUseName:item_name if the Item has a Name

Installation

Downloads

Supported Minecraft versions

1
Yeah, nothing happens when I test this in my world, I've imported it and done everything properly so idk :/
1
1
finally 1.19.40
1
This comment has been removed
1
is this addon not working on android device, because i am using ny and i am out of that world either because of some script error or something.
1
can i modify the pack?
i will make it usable with custom named items
1
You might have to update this, because of the new update :/
1
Do you think you could make a Sneak Detection addon for example if you sneak once itll give you a tag and remove it like a 'hasSneaked' tag and another one where it detects if you keep sneaking and removes the tag if you stop sneaking like a 'isSneaking' tag? (This would be really useful combined with this addon cause you can do stuff like [tag=itemUse:___,tag=isSneaking] to make some things have different abilities, ect? (Please think about it because this is my favourite addon/script on this website by far, so useful but a sneak detection one too would be even more amazing ngl)
1
This comment has been removed
1
How do I write the command to delete all the blocks on the ground?
1
I tried with this:
execute @a[tag=itemUse:minecraft:compass] ~ ~ ~ kill @e[type=item]
1
Uhm, everytime I use this now in the 1.19.20 update, it shuts down my game, saying 'Server Shutdown due to an Unhandled scripting watchdog exception' or something like that, please fix it :(
1
Nah dont worry I figured it out.
1
Hola, muy buen Addon, pero quiero que hagas este SCRIPT completo, con detector de armaduras, o items en slots si se puede, sería muy épico y estaría más completo, uso tu addon ya tiempo
1
its not working, i have experiments and education edition on but it never gives me the tag
1
Hey can i use this mod for my map please? I will provide credit for the use of it
1
Hello pack creator! I am making an addon that allows a player to use custom attacks and stuff and I need this API for it to function. If I credited you in the addon and MCPEDL page could I use the code from your addon to make mine possible? If so, how would you like to be credited. Thanks!