Minecraft – Deleting entities at certain coordinates

minecraft-commandsminecraft-java-edition

Heyo,
I was wondering if there is anyway to test for a certain entity at some preordained coordinates, then delete only those entities at those specific coordinates? More simply – is there a way to delete entities at certain coordinate?

Best Answer

Use the @e selector with the x, y, and z selectors:

/kill @e[x=<X>,y=<Y>,z=<Z>,r=1]