Summary:
@n entity selector, selecting the nearest entity, is not available in Bedrock Edition. In Java Edition 24w21a it has been introduced, but didn't make its way to Bedrock.
https://www.minecraft.net/article/minecraft-snapshot-24w21a
Added @n entity selector, selecting the nearest entity
This functions as @e[sort=nearest,limit=1]
Additional requirements may still be provided; for example: @n[type=pig] will select the closest Pig
Steps to reproduce:
Enter a world with cheats on.
Go to chat.
Type:
/kill @n
Observed results:
There is no @n entity selector in Bedrock.
Expected results:
It should be there in Bedrock as Java Edition has it in Java Edition 24w21a.
Linked issues
is duplicated by 1
Comments 7
Nearest entity now have added in 1.21.100.21 Preview, Last week was mentioned in Changelog
Commands
Added
@n
target selector which returns the single closest entity
Alternatively, you can do /kill @e{type=(name)]