How can you query in Minecraft whether someone has min. Has 5 diamonds and delete them?

fi
6

How can you query in Minecraft whether someone has min. Has 5 diamonds and delete them?

Fo

Does not work unless you have a mod

fi

What would be closest to it

Af

In older versions it could work with the testfor command. Otherwise you can do it via scoreboards

https://minecraft-de.gamepedia.com/...hl/testfor

Pr

I guess with java, with na for.schleife and a command block.
The best thing to do is to find out about command blocks and their programming, I think it's not that difficult, but I've never worked with command blocks

an

Also works without a mod.

an

See here, Skylinerw's answer:

https://www.minecraftforum.net/...mum-amount

You can then delete the diamonds with

clear @a [score_DIAMONDS_min = 5] minecraft: diamond 5