Java 26.2
/kill
@p/kill
Remove selected entities.
/kill @p
Remove entities
A bare /kill removes the executor, and /kill @e removes literally everything — item frames, armor stands and dropped items included. The selector is the whole command, so build it precisely: filter by type, name, tag or distance, and test the same selector with /execute if entity before running the destructive form.
/kill @e[type=item] targets only item entities. Filtering by type is the whole point of a safe /kill; a bare /kill @e removes everything, including armor stands, item frames and paintings.
@e with no filter matches every entity in range. Always add type, tag, name or distance filters, and dry-run the same selector with /execute if entity first to see what it would hit.
Yes -- /kill with no selector targets the executor, so a player running it dies. Add an explicit selector to target something else.
Java 26.2
@pRemove selected entities.
/kill @p