Minecraft Tutorial Part 008 - Testing for items in inventory (Keys)

9 years ago

Tutorial topic - Testing for items in inventory (Keys)
Also Includes - give, testfor

Minecraft is a video game by Mojang/Microsoft. http://www.minecraft.net

The skin I modified - http://www.planetminecraft.com/skin/red-hoodie-2741564/

The Minecraft maps I made - http://www.planetminecraft.com/member/bongotezz/

My Best Friends donation page - https://secure.bestfriends.org/page/outreach/view/personalFR/Bongo
Best Friends website - http://bestfriends.org/
Charity watch's rating for Best Friends - http://www.charitywatch.org/toprated.html#animal

Theme song from - http://www.freesfx.co.uk

give the player a tripwire hook
/give @p minecraft:tripwire_hook

give the player a tripwire hook with the name Key
/give @a minecraft:tripwire_hook 1 0 {display:{Name:"Key"}}

test to see if the player has an item with the name key.
/testfor @p[r=10] {Inventory:[{tag:{display:{Name:"Key"}}}]}

Loading comments...