I'm trying to clear somebody's inventory. They have one lapis and I want it to clear only one lapis at a time, and only clear lapis. Can anybody help? The command I'm currently using is:

/clear @p minecraft:dye 0 1

Solution 1:

The syntax of /clear is:

/clear [player] [item] [data] [maxCount] [dataTag]

Lapis is dye with a data value of 4. As you only want to clear 1 at a time, your command should be:

/clear @p dye 4 1