fix 在1.20.1使用脚本修改/计算分数时不会刷新显示计分板;fix 重置分数时不会重新计算总分
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/activation",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/aviating_distance",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/bedrock_broke_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/damage_taken",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/death_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/dig_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/fishing_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/kill_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/placement_count",
|
||||||
|
"#fzsd:module/scoreboard/assign/scoreboard/general/trade_count"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -257,10 +257,12 @@ help() -> (
|
|||||||
command_reset(player, scoreboard_id) -> (
|
command_reset(player, scoreboard_id) -> (
|
||||||
if(scoreboard_id == null,
|
if(scoreboard_id == null,
|
||||||
run('scoreboard players reset ' + player);
|
run('scoreboard players reset ' + player);
|
||||||
|
recalculate_general(null);
|
||||||
print('已重置' + player + '的所有分数');
|
print('已重置' + player + '的所有分数');
|
||||||
return();
|
return();
|
||||||
);
|
);
|
||||||
scoreboard_remove(scoreboard_id, player);
|
scoreboard_remove(scoreboard_id, player);
|
||||||
|
recalculate_general(scoreboard_id);
|
||||||
print('已重置' + player + '的' + scoreboard_id + '分数');
|
print('已重置' + player + '的' + scoreboard_id + '分数');
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user