Minecraft 1.20 - Detect Item In Player's Off-Hand Or Armor Slots
In this video I show you how to check if a player is holding an item in their offhand, or wearing an item in their armor slots in minecraft version 1.16 and up!
If you liked this video, please be sure to hit the like button and let me know in the comments why you liked it! If you really love my content, please consider subscribing!
**********************************
Commands:
Check to see if a player is holding an item in their offhand:
/execute if entity @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:stick"}]}] run setblock ~ ~ ~-1 minecraft:redstone_block
Check to see if a player is wearing an item in their helmet slot:
/execute if entity @a[nbt={Inventory:[{Slot:103b,id:"minecraft:diamond_helmet"}]}] run setblock ~ ~ ~-1 minecraft:redstone_block
Check to see if a player is wearing an item in their chestplate slot:
/execute if entity @a[nbt={Inventory:[{Slot:102b,id:"minecraft:diamond_chestplate"}]}] run setblock ~ ~ ~-1 minecraft:redstone_block
Check to see if a player is wearing an item in their leggings slot:
/execute if entity @a[nbt={Inventory:[{Slot:101b,id:"minecraft:diamond_leggings"}]}] run setblock ~ ~ ~-1 minecraft:redstone_block
Check to see if a player is wearing an item in their boots slot:
/execute if entity @a[nbt={Inventory:[{Slot:100b,id:"minecraft:diamond_boots"}]}] run setblock ~ ~ ~-1 minecraft:redstone_block
Additional command needed:
/setblock ~ ~ ~2 air
For questions about specific commands please ask in the comments!
👕Buy My Mug or Merch 🡆 https://teespring.com/stores/maxstuff
🧡Become a member 🡆 https://www.youtube.com/channel/UCzkqOdzxj4wY7BmWdXWueoA/join
👍Subscribe to my channel 🡆 http://www.youtube.com/channel/UCzkqOdzxj4wY7BmWdXWueoA?sub_confirmation=1
***********************************
💻Youtube 🡆 https://www.youtube.com/c/maxstuff
🔷Twitter 🡆 https://twitter.com/Mario_Hierio
📷Instagram 🡆 https://www.instagram.com/maxstuff_insta/
***********************************
#minecraft #command #offhand
Other Videos By MaxStuff
Other Statistics
Minecraft Statistics For MaxStuff
There are 18,188,715 views in 1,202 videos for Minecraft. There's over 16 days worth of watchable video for Minecraft published on his channel, or 79.87% of the total watchable video on MaxStuff's YouTube channel.