Player variable in JSON [duplicate]
I'm trying to make a minigame where you have different kits. You step on a pressure plate and get all your armor and effects added. That's all working fine. I'm trying to make it so it places a sign above the pressure plate saying
"TAKEN"
"BY"
"[PLAYERWHOHASTHATKIT]"
In bold dark red
Is this possible? I've tried /blockdata ~ ~-1 ~ {"Text3":"@p"}
with all the other text I want. Is this possible?
You must use the selector
tag of the text component to resolve a selector into a name. It replaces text
, translate
, and score
tags at that depth (such that you cannot use selector
and text
at the same time).
Example:
/blockdata ~ ~-1 ~ {"Text3":"{\"selector\":\"@p\",\"color\":\"dark_red\"}"}