Advertisement
Skylinerw

@MountainMarker - 14w03b - Testing For Player NBT Data

Jan 10th, 2014
7,411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Via: https://www.youtube.com/watch?v=lkzDB6xt2lU
  2.  
  3. "I know its probably in the description, but could you give me the exact command to test if you are wearing armor and which piece(s)?"
  4.  
  5. Must be in order by Slot number (ascending) and no other items can be in the inventory. Must include all 4 base tags "id", "Damage", "Count", and "Slot", labeling their tag-types. Thus cannot testfor if armor becomes unexpectedly damaged. Full iron armor:
  6.  
  7. /testfor @p {Inventory:[{id:minecraft:iron_boots,Damage:0s,Count:1b,Slot:100b},{id:minecraft:iron_leggings,Damage:0s,Count:1b,Slot:101b},{id:minecraft:iron_chestplate,Damage:0s,Count:1b,Slot:102b},{id:minecraft:iron_helmet,Damage:0s,Count:1b,Slot:103b}]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement