How can I clear an item with a custom name? [duplicate]

I've read all the same questions already but mine is in Bedrock, not Java, so. I need a command to clear one item custom named from my inventory. I've already tried clear @p [type=light_block] 1 and kill @e [type=item, name="$100"] 1 but it doesn't work. I'm using Minecraft PE Bedrock 1.16.201


Solution 1:

You can do items with a certain ID or data. For example, clear a yellow concrete block:

/clear @p concrete 4

If you have a certain block from an addon, you can still use it in the clear command:

/clear @p myprefix:light_block

Another thing you can do is give the player a normally unobtainable item, such as a top smooth stone slab:

/clear @p stone_slab 8

Or something that you wouldn’t normally use in game like a clock:

/clear @p clock

Using names for clearing isn’t possible.