mojira.dev
MC-74156

Using target in book gived to player brokes content

Command:
/give @p written_book 1 0 {
title:"Test",
pages:[
"{
text:\"your gold: \",
extra:[
{
score:{name:\"@p\",objective:\"P_Gold\"}
}
]
}"
]
}

When command in command_block is executed as OP, book looks like this:
your gold: 125

But when is executed by player (pushing button) books looks like this:
{
text:"your gold:",
extra:[
{
score:{name:{"@p",objective:"P_Gold"}}]}

Steps to Reproduce:
1. place cmd_block
2. enter command: /give @p written_book 1 0 {
title:"Test",
pages:[
"{
text:\"your gold: \",
extra:[
{
score:{name:\"@p\",objective:\"P_Gold\"}
}
]
}"
]
}
3. activate cmd_block
4. /deop yourself
5. activeate cmd_block again

... same problem causes using of parametr
extra:[{selector:@p}]

Linked issues

Comments 1

Kai

(Unassigned)

Unconfirmed

Minecraft 1.8.1-pre4

Retrieved