forum Forumsplay_arrow Minecraft fiber_manual_record Help

1

1.13 /execute

1 emerald10 replies121 views
created 02/16/2019 10:52 am by neikrodent
last reply 02/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 avatar
neikrodent
Level 7 : Apprentice Engineer
3

10 replies

3
02/16/2019 9:37 pm
Level 31 : Artisan Taco
spychicken123
avatar
execute at @a[nbt={Inventory:[{id:"minecraft:blaze_rod"}]}] run say hi
i think you can figure it out from here...
1
02/22/2019 3:34 pm
Level 7 : Apprentice Engineer
neikrodent
avatar
Thank you for the *Normal* and "right" answer!
2
02/16/2019 11:18 pm
Level 42 : Master Crafter
DiamondPlayables
avatar
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"
1
02/22/2019 3:35 pm
Level 7 : Apprentice Engineer
neikrodent
avatar
Thank you for the right correction of the *normal* "right" answer.
1
02/22/2019 7:48 pm
Level 42 : Master Crafter
DiamondPlayables
avatar
no probs.
2
02/17/2019 9:47 am
Level 27 : Expert Blockhead
oyo321
avatar
Like he says: /execute as @a[nbt={Inventory:[{id:"minecraft:apple"}]}] run say hi
1
02/16/2019 9:38 pm
Level 31 : Artisan Taco
spychicken123
avatar
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
02/16/2019 3:30 pm
Level 19 : Journeyman Nerd
Tau__
avatar
A simple Google Search would've sufficed:

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

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome