I am trying to make a automatic shop in my world and I used these commands /clear and /give but the command /clear doesn't work . I wrote /clear @p iron_nugget 20 in a command block i press the button and it doesn't remove anything
I am trying to make a automatic shop in my world and I used these commands /clear and /give but the command /clear doesn't work . I wrote /clear @p iron_nugget 20 in a command block i press the button and it doesn't remove anything
The syntax for the
clearcommand is:The third parameter of the
clearcommand isdata, used to specify a type of item for items with multiple variations (e.g. wooden planks, colored wool, etc.) So,datamust be omitted when clearingiron_nuggetbecause only one type of iron nugget exists. Therefore, in order for the command to work, you must use a0before themaxCountparameter: