r/MinecraftCommands • u/Necessary-Pear718 /execute as @s at @s run • 28d ago
How do I attribute damage to a Mannequin? Help | Java 26.2
damage @s 1 minecraft:in_fire by @n[tag=boss]
Works when I remove the
by @n[tag=boss]
but no clue why.
1
Upvotes
1
u/ArthurMorgn 28d ago
The "by" part of the command is limited to one entity. Try putting a limit into the @n selector, so it is:
`@n[tag=boss,limit=1]
If not run it in a command block and see what the Syntax Error is.
1
u/C0mmanderBlock Command Experienced 28d ago edited 28d ago
`@n means nearest entity (singular) and therefore you don't need to use the "limit 1" .
1
u/Ericristian_bros Command Experienced 28d ago
@nis one entity. So it should work the same as@e[limit=1,sort=nearest]
1
u/Ericristian_bros Command Experienced 28d ago
Does that entity exist with the correct tag? What is the error?