Need to know how to remove a certain item from a players inventory in minecraft [duplicate]

Need to know how to remove a certain item from a players inventory in minecraft [duplicate] - From below of couple in casual clothes carrying big carton box together while moving packed personal items into new apartment

Im currently able to detect an item in a players inventory and it is only active if the player is holding it while pressing the button that activates the chosen item. But I've been trying to get a chained, conditional, Always active block after it to remove the item after pressing the button. Is it possible to do so?



Best Answer

Yes:

By using the /clear command you can clear an item from a players inventory /clear @p <or> (playername) (item name) For an example /clear @p minecraft:dirt




Pictures about "Need to know how to remove a certain item from a players inventory in minecraft [duplicate]"

Need to know how to remove a certain item from a players inventory in minecraft [duplicate] - Adult man carrying box down stairs
Need to know how to remove a certain item from a players inventory in minecraft [duplicate] - From above of full length male in casual clothes carrying carton box down stairs while moving personal items to new house
Need to know how to remove a certain item from a players inventory in minecraft [duplicate] - Unpacked boxes in middle of room



How do you delete specific items from a player in Minecraft?

You can clear items from a player's inventory using the /clear command in Minecraft.



Minecraft 1.16.5: How to remove certain items from a players inventory




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Ketut Subiyanto, Ketut Subiyanto, Ketut Subiyanto, Ketut Subiyanto