From a9f8c2068ae134d6021560f21b43e505e13dfd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=B6=E7=9A=93?= <1214946206@qq.com> Date: Fri, 2 Sep 2022 06:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8A=E7=BA=AF=E9=BB=91=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=B5=85=E4=B8=80=E7=82=B9=E7=82=B9=E7=9A=84?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../functions/display/register_id.mcfunction | 2 +- .../functions/interactor/display.mcfunction | 2 +- .../general/placement_count.mcfunction | 6 +- .../scoreboard/display/register_id.mcfunction | 20 ++--- .../set_text/placement_count/aqua.mcfunction | 6 +- .../set_text/placement_count/black.mcfunction | 6 +- .../set_text/placement_count/blue.mcfunction | 6 +- .../placement_count/dark_aqua.mcfunction | 6 +- .../placement_count/dark_blue.mcfunction | 6 +- .../placement_count/dark_gray.mcfunction | 6 +- .../placement_count/dark_green.mcfunction | 6 +- .../placement_count/dark_purple.mcfunction | 6 +- .../placement_count/dark_red.mcfunction | 6 +- .../set_text/placement_count/gold.mcfunction | 6 +- .../set_text/placement_count/gray.mcfunction | 6 +- .../set_text/placement_count/green.mcfunction | 6 +- .../placement_count/light_purple.mcfunction | 6 +- .../set_text/placement_count/red.mcfunction | 6 +- .../set_text/placement_count/white.mcfunction | 6 +- .../placement_count/yellow.mcfunction | 6 +- .../module/scoreboard/load.mcfunction | 1 + scripts/fzsd_score.sc | 85 +++++++++++-------- 23 files changed, 116 insertions(+), 98 deletions(-) diff --git a/README.md b/README.md index 3837ccc..c427ae4 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ ## *目前仍在测试阶段,请先备份服务器再使用!* -[![数据包版本](https://img.shields.io/badge/测试版-3.0+beta.8-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases/v3.0-beta.8) [![MC版本](https://img.shields.io/badge/Minecraft-1.19+-blue.svg)](https://minecraft.net/) +[![数据包版本](https://img.shields.io/badge/测试版-3.0+beta.11-blue.svg)](https://gitee.com/harvey-husky/FZ-sDatapack/releases/v3.0-beta.11) [![MC版本](https://img.shields.io/badge/Minecraft-1.19+-blue.svg)](https://minecraft.net/) > 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases) diff --git a/data/fzsd.extra.bbl/functions/display/register_id.mcfunction b/data/fzsd.extra.bbl/functions/display/register_id.mcfunction index ba2fceb..489cb08 100644 --- a/data/fzsd.extra.bbl/functions/display/register_id.mcfunction +++ b/data/fzsd.extra.bbl/functions/display/register_id.mcfunction @@ -3,4 +3,4 @@ execute if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. run function #fzsd:calculation/highest_id_add_1 execute if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. run scoreboard players operation fzsd.module.scoreboard.display.id.bedrock_broke_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer -execute if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册破基岩计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.bedrock_broke_count", "objective": "fzsd.variable.integer"}}] \ No newline at end of file +execute if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.bedrock_broke_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.bedrock_broke_count", "objective": "fzsd.variable.integer"}}] \ No newline at end of file diff --git a/data/fzsd.extra.bbl/functions/interactor/display.mcfunction b/data/fzsd.extra.bbl/functions/interactor/display.mcfunction index 573041c..a9e418d 100644 --- a/data/fzsd.extra.bbl/functions/interactor/display.mcfunction +++ b/data/fzsd.extra.bbl/functions/interactor/display.mcfunction @@ -1,3 +1,3 @@ # 见#fzsd:module/scoreboard/interactor/display ## 当破基岩榜分数不为0时向玩家显示按钮 -execute if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. run tellraw @s [{"text": "[", "color": "dark_gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1210"}, "hoverEvent": {"action": "show_text", "contents": {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}}}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "]"}] \ No newline at end of file +execute if data storage fzsd:install fzsd.extra{bbl:1b} if score fzsd.module.scoreboard.total.bedrock_broke_count fzsd.module.scoreboard.assign.general matches 1.. run tellraw @s [{"text": "[", "color": "dark_gray", "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -1210"}, "hoverEvent": {"action": "show_text", "contents": {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}}}, {"nbt": "text", "interpret": true, "storage": "fzsd.extra.bbl:text"}, {"text": "]"}] \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction b/data/fzsd/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction index 8791167..4165b3b 100644 --- a/data/fzsd/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction +++ b/data/fzsd/functions/module/scoreboard/assign/scoreboard/general/placement_count.mcfunction @@ -1,4 +1,4 @@ -team join fzsd.module.scoreboard.display.placement_count 总放置方块数 +team join fzsd.module.scoreboard.display.placement_count 总方块放置数 -scoreboard players operation 总放置方块数 fzsd.module.scoreboard.display.general = fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general -scoreboard players operation 总放置方块数 fzsd.module.scoreboard.display.placement_count = fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general \ No newline at end of file +scoreboard players operation 总方块放置数 fzsd.module.scoreboard.display.general = fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general +scoreboard players operation 总方块放置数 fzsd.module.scoreboard.display.placement_count = fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction b/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction index d2d8bc8..51acc61 100644 --- a/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/register_id.mcfunction @@ -2,58 +2,58 @@ function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.general fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册总榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.general", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.general", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.general", "objective": "fzsd.variable.integer"}}] #### 注册活跃度计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.activation fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册活跃度计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.activation", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.activation", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.activation", "objective": "fzsd.variable.integer"}}] #### 注册飞行距离计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.aviating_distance fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册飞行距离计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.activation", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.aviating_distance", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.aviating_distance", "objective": "fzsd.variable.integer"}}] #### 注册抖M榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.damage_taken fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册抖M榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.damage_taken", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.damage_taken", "objective": "fzsd.variable.integer"}}] #### 注册死亡榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.death_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册死亡榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.death_count", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.death_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.death_count", "objective": "fzsd.variable.integer"}}] #### 注册挖掘榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.dig_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册挖掘榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.dig_count", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.dig_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.dig_count", "objective": "fzsd.variable.integer"}}] #### 注册钓鱼榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.fishing_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册钓鱼榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.fishing_count", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.fishing_count", "objective": "fzsd.variable.integer"}}] #### 注册击杀榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.kill_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册击杀榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.kill_count", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册击"}, {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.kill_count", "objective": "fzsd.variable.integer"}}] #### 注册交易榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.trade_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册交易榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.trade_count", "objective": "fzsd.variable.integer"}}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.trade_count", "objective": "fzsd.variable.integer"}}] #### 注册放置榜计分板id function #fzsd:calculation/highest_id_add_1 scoreboard players operation fzsd.module.scoreboard.display.id.placement_count fzsd.variable.integer = fzsd.module.scoreboard.display.highest_id fzsd.variable.integer ##### 日志 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册放置榜计分板id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.placement_count", "objective": "fzsd.variable.integer"}}] \ No newline at end of file +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "注册"}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}, {"text": "id为:"}, {"score": {"name": "fzsd.module.scoreboard.display.id.placement_count", "objective": "fzsd.variable.integer"}}] \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/aqua.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/aqua.mcfunction index fbd2beb..22c2aef 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/aqua.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/aqua.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "aqua"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "aqua"}' scoreboard objectives setdisplay sidebar.team.aqua fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "aqua"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "aqua"} team modify fzsd.module.scoreboard.display.placement_count color aqua -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "aqua"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "aqua"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/black.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/black.mcfunction index 3099669..9abea97 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/black.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/black.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "#202020"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "#202020"}' scoreboard objectives setdisplay sidebar.team.black fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "#202020"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "#202020"} team modify fzsd.module.scoreboard.display.placement_count color black -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "#202020"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "#202020"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/blue.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/blue.mcfunction index 0452626..1ea5d07 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/blue.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/blue.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "blue"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "blue"}' scoreboard objectives setdisplay sidebar.team.blue fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "blue"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "blue"} team modify fzsd.module.scoreboard.display.placement_count color blue -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "blue"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "blue"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_aqua.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_aqua.mcfunction index dad8477..c490cc1 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_aqua.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_aqua.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_aqua"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_aqua"}' scoreboard objectives setdisplay sidebar.team.dark_aqua fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_aqua"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_aqua"} team modify fzsd.module.scoreboard.display.placement_count color dark_aqua -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_aqua"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_aqua"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_blue.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_blue.mcfunction index 6fa8e48..845e618 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_blue.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_blue.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_blue"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_blue"}' scoreboard objectives setdisplay sidebar.team.dark_blue fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_blue"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_blue"} team modify fzsd.module.scoreboard.display.placement_count color dark_blue -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_blue"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_blue"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_gray.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_gray.mcfunction index fa9a231..6b6ad14 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_gray.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_gray.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_gray"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_gray"}' scoreboard objectives setdisplay sidebar.team.dark_gray fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_gray"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_gray"} team modify fzsd.module.scoreboard.display.placement_count color dark_gray -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_gray"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_gray"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_green.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_green.mcfunction index 5853ed8..fd792e4 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_green.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_green.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_green"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_green"}' scoreboard objectives setdisplay sidebar.team.dark_green fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_green"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_green"} team modify fzsd.module.scoreboard.display.placement_count color dark_green -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_green"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_green"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_purple.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_purple.mcfunction index 82faa73..2b35662 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_purple.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_purple.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_purple"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_purple"}' scoreboard objectives setdisplay sidebar.team.dark_purple fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_purple"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_purple"} team modify fzsd.module.scoreboard.display.placement_count color dark_purple -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_purple"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_purple"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_red.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_red.mcfunction index 88dc5ea..7ce5103 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_red.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/dark_red.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "dark_red"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "dark_red"}' scoreboard objectives setdisplay sidebar.team.dark_red fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "dark_red"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "dark_red"} team modify fzsd.module.scoreboard.display.placement_count color dark_red -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "dark_red"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "dark_red"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gold.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gold.mcfunction index 75192f2..6e01895 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gold.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gold.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "gold"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "gold"}' scoreboard objectives setdisplay sidebar.team.gold fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "gold"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "gold"} team modify fzsd.module.scoreboard.display.placement_count color gold -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "gold"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "gold"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gray.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gray.mcfunction index e98e5d6..2724906 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gray.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/gray.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "gray"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "gray"}' scoreboard objectives setdisplay sidebar.team.gray fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "gray"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "gray"} team modify fzsd.module.scoreboard.display.placement_count color gray -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "gray"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "gray"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/green.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/green.mcfunction index 47a1dd4..32e9066 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/green.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/green.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "green"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "green"}' scoreboard objectives setdisplay sidebar.team.green fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "green"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "green"} team modify fzsd.module.scoreboard.display.placement_count color green -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "green"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "green"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/light_purple.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/light_purple.mcfunction index a51be4a..899d0e8 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/light_purple.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/light_purple.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "light_purple"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "light_purple"}' scoreboard objectives setdisplay sidebar.team.light_purple fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "light_purple"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "light_purple"} team modify fzsd.module.scoreboard.display.placement_count color light_purple -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "light_purple"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "light_purple"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/red.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/red.mcfunction index 8b8af7b..d9827e0 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/red.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/red.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "red"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "red"}' scoreboard objectives setdisplay sidebar.team.red fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "red"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "red"} team modify fzsd.module.scoreboard.display.placement_count color red -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "red"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "red"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/white.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/white.mcfunction index 715eaa2..5b3fee2 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/white.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/white.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "white"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "white"}' scoreboard objectives setdisplay sidebar.team.white fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "white"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "white"} team modify fzsd.module.scoreboard.display.placement_count color white -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "white"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "white"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/yellow.mcfunction b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/yellow.mcfunction index 2cd9bef..4bf5f01 100644 --- a/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/yellow.mcfunction +++ b/data/fzsd/functions/module/scoreboard/display/set_text/placement_count/yellow.mcfunction @@ -1,7 +1,7 @@ # 调用者:#fzsd:module/scoreboard/display/set_text/placement_count -data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "放置榜", "color": "yellow"}' +data modify storage fzsd:module fzsd.scoreboard.text.placement_count set value '{"text": "方块放置榜", "color": "yellow"}' scoreboard objectives setdisplay sidebar.team.yellow fzsd.module.scoreboard.display.placement_count -scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "放置榜", "color": "yellow"} +scoreboard objectives modify fzsd.module.scoreboard.display.placement_count displayname {"text": "方块放置榜", "color": "yellow"} team modify fzsd.module.scoreboard.display.placement_count color yellow -team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "放置榜", "color": "yellow"} \ No newline at end of file +team modify fzsd.module.scoreboard.display.placement_count displayName {"text": "方块放置榜", "color": "yellow"} \ No newline at end of file diff --git a/data/fzsd/functions/module/scoreboard/load.mcfunction b/data/fzsd/functions/module/scoreboard/load.mcfunction index ee31025..a39ad22 100644 --- a/data/fzsd/functions/module/scoreboard/load.mcfunction +++ b/data/fzsd/functions/module/scoreboard/load.mcfunction @@ -11,6 +11,7 @@ execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellr execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.fishing_count - "}, {"nbt": "fzsd.scoreboard.text.fishing_count", "interpret": true, "storage": "fzsd:module"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.kill_count - "}, {"nbt": "fzsd.scoreboard.text.kill_count", "interpret": true, "storage": "fzsd:module"}] execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.trade_count - "}, {"nbt": "fzsd.scoreboard.text.trade_count", "interpret": true, "storage": "fzsd:module"}] +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "fzsd.module.scoreboard.display.placement_count - "}, {"nbt": "fzsd.scoreboard.text.placement_count", "interpret": true, "storage": "fzsd:module"}] ## 日志 execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载组件:计分板"}] \ No newline at end of file diff --git a/scripts/fzsd_score.sc b/scripts/fzsd_score.sc index 52c3fb8..d0e6a1c 100644 --- a/scripts/fzsd_score.sc +++ b/scripts/fzsd_score.sc @@ -13,8 +13,8 @@ __config() -> { 'commands' -> { '' -> 'help', 'help' -> 'help', - 'delete_old ' -> 'delete_old', - 'update_from ' -> 'update_from', + 'delete_old ' -> 'delete_old', + 'update_from ' -> 'update_from', 'restore_from_stats' -> 'restore_from_stats', 'recalculate_total' -> 'recalculate_total_scores', 'commandPlayer ' -> 'command_player' @@ -23,7 +23,16 @@ __config() -> { 'boolean' -> { 'type' -> 'bool' }, - 'fzsd_version' -> { + 'update_from' -> { + 'type' -> 'term', + 'suggest' -> [ + '2.x', + '3.0-beta.4', + '3.0-beta.9', + '3.0-beta.10' + ] + }, + 'delete_old' -> { 'type' -> 'term', 'suggest' -> [ '2.x', @@ -87,40 +96,49 @@ try_restore_team_from_cache(player) -> ( help() -> ( print('暂未开发'); - return(0); + return(); ); delete_old(fzsd_version) -> ( - old_scoreboards = []; if(fzsd_version == '3.0-beta.9', ( old_scoreboards = ['fzsd.extra.bbl.display']; + for(old_scoreboards, scoreboard_remove(_)); ), fzsd_version == '2.x', ( old_scoreboards = ['usedDiaAxe', 'usedDiaPickaxe', 'usedDiaShovel', 'usedDiaHoe', 'usedIroAxe','usedIroPickaxe', 'usedIroShovel', 'usedIroHoe', 'usedStoAxe', 'usedStoPickaxe', 'usedStoShovel', 'usedStoHoe', 'usedWooAxe', 'usedWooPickaxe', 'usedWooShovel', 'usedWooHoe', 'usedGolAxe', 'usedGolPickaxe', 'usedGolShovel', 'usedGolHoe', 'usedNetAxe', 'usedNetPickaxe', 'usedNetShovel', 'usedNetHoe', 'usedShears', 'damageTaken', '10xDamageTaken', 'deathCounter', 'deathTester', 'digCounter', 'fishingCounter', 'fishingTester', 'killCounter', 'tradingCounter', 'totalList', 'bedrockBreaked', 'fz.bbl', 'fz.aviate1m', 'fz.aviateCounter', 'fz.aviateOneTime', 'Health', 'carpetBot', 'parameter']; team_remove('carpetBot'); team_remove('shadowedPlayer'); + for(old_scoreboards, scoreboard_remove(_)); ), fzsd_version == '3.0-beta.4', ( old_scoreboards = ['fz.module.scoreboard.display.activation', 'fz.module.scoreboard.display.damage_taken', 'fz.module.scoreboard.display.death_count', 'fz.module.scoreboard.display.dig_count', 'fz.module.scoreboard.display.fishing_count', 'fz.module.scoreboard.display.kill_count', 'fz.module.scoreboard.display.trade_count', 'fz.module.scoreboard.display.bedrock_broke_count', 'fz.module.scoreboard.display.aviating_distance', 'fz.module.scoreboard.display.placement_count', 'fz.module.scoreboard.assign.general', 'fz.module.scoreboard.display.general', 'fz.module.scoreboard.interactor']; team_remove('fz.module.scoreboard.fake'); team_remove('fz.module.scoreboard.shadow'); - ) + for(old_scoreboards, scoreboard_remove(_)); + ), + print('参数错误!'); + return(); ); - for(old_scoreboards, scoreboard_remove(_)); print('已清除旧版计分板!'); - return(0); + return(); ); update_from(fzsd_version) -> ( - params = []; - if(fzsd_version == '3.0-beta.9', + if(fzsd_version == '3.0-beta.10', + ( + scoreboard_remove('fzsd.module.scoreboard.display.placement_count', '总放置方块数'); + ), + fzsd_version == '3.0-beta.9', ( params = [ ['fzsd.extra.bbl.display', 'fzsd.module.scoreboard.display.bedrock_broke_count'] - ] + ]; + for(params, merge_score(..._, fzsd_version)); + // 清除旧计分板 + delete_old(fzsd_version); ), fzsd_version == '2.x', ( @@ -134,7 +152,10 @@ update_from(fzsd_version) -> ( ['tradingCounter', 'fzsd.module.scoreboard.display.trade_count'], ['bedrockBreaked', 'fzsd.module.scoreboard.display.bedrock_broke_count'], ['fz.aviate1m', 'fzsd.module.scoreboard.display.aviating_distance'] - ] + ]; + for(params, merge_score(..._, fzsd_version)); + // 清除旧计分板 + delete_old(fzsd_version); ), fzsd_version == '3.0-beta.4', ( @@ -149,16 +170,17 @@ update_from(fzsd_version) -> ( ['fz.module.scoreboard.display.bedrock_broke_count', 'fzsd.module.scoreboard.display.bedrock_broke_count'], ['fz.module.scoreboard.display.aviating_distance', 'fzsd.module.scoreboard.display.aviating_distance'], ['fz.module.scoreboard.display.placement_count', 'fzsd.module.scoreboard.display.placement_count'] - ] - ) + ]; + for(params, merge_score(..._, fzsd_version)); + // 清除旧计分板 + delete_old(fzsd_version); + ), + print('参数错误!'); + return(); ); - for(params, merge_score(..._, fzsd_version)); - - // 清除旧计分板 - delete_old(fzsd_version); - - print('完成!'); - return(0); + recalculate_total_scores(); + print('已从' + fzsd_version + '升级!'); + return(); ); merge_score(from, to, fzsd_version) -> ( @@ -190,11 +212,7 @@ merge_score(from, to, fzsd_version) -> ( ); print('已合并:' + to); - - // 重新计算总分 - recalculate_total_score(to, get_total_score_name_new(to)); - - return(0); + return(); ); // 因为新计分板允许玩家自定义显示的总榜名称,故续做复杂判断才能使脚本确定之 @@ -259,8 +277,8 @@ recalculate_total_scores() -> ( 'fzsd.module.scoreboard.display.aviating_distance' ]; for(scoreboards,recalculate_total_score(_, get_total_score_name_new(_))); - print('完成!'); - return(0); + print('已重新计算总分!'); + return(); ); recalculate_total_score(scoreboard, total_score_name_new) -> ( @@ -278,8 +296,7 @@ recalculate_total_score(scoreboard, total_score_name_new) -> ( total_score ); display_total_score(scoreboard); - print('已重新计算总分:' + scoreboard); - return(0); + return(); ); display_total_score(scoreboard) -> ( @@ -288,17 +305,17 @@ display_total_score(scoreboard) -> ( function_name = str_1:(length(str_1) - 1); // 运行函数,将分数赋值到显示计分板上 run('function #fzsd:module/scoreboard/assign/scoreboard/general/' + function_name); - return(0); + return(); ); restore_from_stats() -> ( print('暂未开发'); - return(0); + return(); ); merge_stat(scoreboard, ...stats) -> ( print('暂未开发'); - return(0); + return(); ); command_player(boolean) -> ( @@ -313,5 +330,5 @@ contains(list, value) -> ( debug(msg) -> ( logger('debug', msg); - return(0); + return(); ); \ No newline at end of file