Query Minecraft inventory?

Co
5

Can you use a command to query whether someone has, for example, 32 cobblestones in the inventory?

gl

Which version?

Bedrock or Java?

Co

Java

gl

Which version?

Co

Yes

gl

/ execute if entity @a [nbt = {Inventory: [{id: "minecraft: cobblestone", Count: 32b}]}] run…