1

1.13 /execute

neikrodent •2/16/19 10:52 am
•
449
•
2/22/2019 7:48 pm
how do you check if a player has e.g. an apple in his inventory?
1.13 /execute is confusing.
Posted by
neikrodent
Level 15 : Journeyman System
3

  Have something to say?

Join • Sign in

10

spychicken123
• 02/16/2019 9:37 pm
• Level 43 : Master Taco
execute at @a[nbt={Inventory:[{id:"minecraft:blaze_rod"}]}] run say hi
i think you can figure it out from here...
3
neikrodent
• 02/22/2019 3:34 pm
• Level 15 : Journeyman System
Thank you for the *Normal* and "right" answer!
1
TheDiamondPlayables
• 02/16/2019 11:18 pm
• Level 84 : Elite Programmer
history
change "at" into "as" so it executes for all players individually. Using your command it will only execute it at their position, and output will give out as 1.
So if there were 2 people, 1 don't have the item and the other does then this happens:
- Execute command finds the player that has the item
- Result output will be executed by the executor since there is no execute as to change who will execute command => the one that don't have the item "say hi"
3
neikrodent
• 02/22/2019 3:35 pm
• Level 15 : Journeyman System
Thank you for the right correction of the *normal* "right" answer.
1
TheDiamondPlayables
• 02/22/2019 7:48 pm
• Level 84 : Elite Programmer
no probs.
1
oyo321
• 02/17/2019 9:47 am
• Level 40 : Master Blockhead
Like he says: /execute as @a[nbt={Inventory:[{id:"minecraft:apple"}]}] run say hi
2
spychicken123
• 02/16/2019 9:38 pm
• Level 43 : Master Taco
if you want you can also have it facing another command block, and then have the next one set to chain and take out the "run say hi" command or whatever you put there
1
6_28
• 02/16/2019 3:30 pm
• Level 32 : Artisan Nerd
A simple Google Search would've sufficed:

www.youtube.com/watch?v=WsgzNaDqX3E
1
neikrodent
• 02/16/2019 4:47 pm
• Level 15 : Journeyman System
That video doesn't even answer my question
1
neikrodent
• 02/16/2019 4:45 pm
• Level 15 : Journeyman System
Aha, and you could simple give a normal reply.
1

Welcome