mojira.dev
MCPE-78583

One command doesn't work

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

Comments 1

The syntax for the clear command is:

/clear [player] [itemName] [data] [maxCount]

The third parameter of the clear command is data, used to specify a type of item for items with multiple variations (e.g. wooden planks, colored wool, etc.) So, data must be omitted when clearing iron_nugget because only one type of iron nugget exists. Therefore, in order for the command to work, you must use a 0 before the maxCount parameter:

/clear @p iron_nugget 0 20

Michalis Platanis

(Unassigned)

Unconfirmed

iOS

1.14.60 Hotfix

Retrieved