_xi_mo_
关于translate的运用语法: {"rawtext":[{"translate":"%%s","with":{"rawtext":[{"selector":"@a"},{"text":""}]}]}

1. %%s是什么
%%后面的数字就是第几个在with里解读成功的项,如若{"rawtext":[{"translate":"%%s","with":{"rawtext":[{"selector":"@a[scores={test=..1}]"},{"text":"1"}]}]}中,玩家的test为1.则返回值是"1"

2. 运用
如若{"rawtext":[{"translate":"%%s","with":{"rawtext":[{"selector":"@a[scores={test=..1}]"},{"selector":"@a[scores={test=..2}]"},{"text":"1"},{"text":"2"}]}]}中,玩家的test为2,则会跳过{"selector":"@a[scores={test=..1}]"}来将执行成功的第一个选项作为标准计算%%s,则其返回值为"2"

第一页 上一页 下一页 最后一页