Minecraft using the /execute command for specific people

Minecraft using the /execute command for specific people - Laughing businesswoman working in office with laptop

I'm trying to make a kit pvp map in vanilla Minecraft, but I ran into a problem. I want specific people to get a certain effect. So I got a /testfor command:

/testfor @a{SelectedItemSlot:0,Inventory:[{Slot:0b,tag:{display:{Name:"Fire Wand"}}}]}

This command tests if any person has this specified item name in slot 0. It then turns on a comparator which activates the second command once it finds that person:

/execute @p ~ ~ ~ summon Fireball ~2 ~1 ~ {ExplosivePower:10,direction:[0.0,0.0,0.0]}

How can I specify this command to the person holding the named item?






Pictures about "Minecraft using the /execute command for specific people"

Minecraft using the /execute command for specific people - Amazed formal male looking at laptop screen
Minecraft using the /execute command for specific people - Modern Asian man in jacket and glasses looking at laptop and screaming with mouth wide opened on white background
Minecraft using the /execute command for specific people - Bored formal man watching laptop at desk



How do you execute a command as someone else in Minecraft?

Type the command in the chat window and press the Enter key to run the command. Once the cheat has been entered, the flame particle will appear directly 1 block in front of the entity running the command.

What is the command to target a player in Minecraft?

The center of interest of this post is another feature of Minecraft, and that is the use of commands in the game....How to select targets with Minecraft commands:TargetDescription@pTo target the nearest Player@rTo target a random Player@sTo target the person executing the command (yourself)2 more rows

How do you summon a specific entity in Minecraft?

The command for summoning is pretty simple. "/summon mob". Players just need to fill in the mob name, though there are a few exceptions. The command remains the same for both Minecraft Java and Bedrock Edition, and is one of the simplest to use.



Minecraft Execute Command [1.19] Tutorial




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Andrea Piacquadio, Andrea Piacquadio, Andrea Piacquadio, Andrea Piacquadio