Mojira Archive
MC-152197

@s selector doesn't work in /data commands

You need a sign and an entity to test this commands.

Replace <pos of sign> with the coords of your sign.

 

/execute as @e[type=!minecraft:player,limit=1,sort=nearest] run data merge block <pos of sign> {Text1:'{"extra":[{"text":"Name: "},{"selector":"@s"}],"text":""}'}

 

/execute as @e[type=!minecraft:player,limit=1,sort=nearest] run data modify block <pos of sign> Text1 set value '{"extra":[{"text":"Health: "},{"nbt":"Health","entity":"@s"}],"text":""}'

 

Invalid

FACS01

2019-05-18, 05:57 AM

2019-05-18, 08:23 AM

2019-05-18, 08:22 AM

0

1

Unconfirmed

Commands

Minecraft 1.14.2 Pre-Release 2

-