1

Help with /testfor command

avrona •7/20/15 9:23 am
•
446
•
7/21/2015 1:18 pm
I am creating a prison for my server and I want to create a detector for this item in a player's inventory:

minecraft:quartz 1 0 {display:{Name:Hidden File,Lore:[A smuggled in file. Contraband!]}}

What will the testfor command for be?
Posted by
avrona
Level 40 : Master Explorer
37

  Have something to say?

Join • Sign in

3

avrona
• 07/21/2015 10:48 am
• Level 40 : Master Explorer
I put the command in but it says I don't meet the data required even though I have the item!
1
FalseKing
• 07/21/2015 1:18 pm
• Level 1 : New Architect
I got it! here's the command I used to give the quartz:
/give @p minecraft:quartz 1 0 {display:{Name:"Hidden File",Lore:["A smuggled in file. Contraband!"]}}
Here's the command I used to detect the quartz:
testfor @a {Inventory:[{id:"minecraft:quartz",Count:1b,tag:{display:{Name:"Hidden File",Lore:["A smuggled in file. Contraband!"]}}}]}
1
Jmal116
• 07/20/2015 9:52 pm
• Level 34 : Artisan System
You'll want to search through the player's inventory, just without the 'Slot' tag:
testfor @a {Inventory:[{id:"minecraft:quartz",Count:1b,tag:{display:{Name:"Hidden File",Lore:["A smuggled in file. Contafband!"]}}}]}
1

Welcome