2022-06-23 15:43:39 +08:00
|
|
|
|
# 调用者:#fz:module/scoreboard/load
|
|
|
|
|
|
|
|
|
|
## 异常检测
|
2022-06-27 16:06:15 +08:00
|
|
|
|
execute unless data storage fz:install_manager fz.module{scoreboard: 1b} run tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
2022-06-25 02:22:23 +08:00
|
|
|
|
|
|
|
|
|
## 调试
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "计分板显示文本已设为:"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.general - "}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.activation - "}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.aviating_distance - "}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.damage_taken - "}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.death_count - "}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.dig_count - "}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.fishing_count - "}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.kill_count - "}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}]
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"text": "", "color": "green"}, {"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "fz.module.scoreboard.display.trade_count - "}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}]
|
2022-06-23 15:43:39 +08:00
|
|
|
|
|
2022-06-27 16:06:15 +08:00
|
|
|
|
## 初始化计分板
|
|
|
|
|
### 重置计分板最大id计数
|
|
|
|
|
scoreboard players set fz.module.scoreboard.display.highest_id fz.variable.integer -1
|
|
|
|
|
### 设置颜色、名称、运行时数字id,同时会计算最大id数
|
|
|
|
|
function #fz:module/scoreboard/display/init
|
|
|
|
|
|
|
|
|
|
## 重置轮播计分板ID
|
|
|
|
|
scoreboard players set fz.module.scoreboard.display.current_id fz.variable.integer 0
|
2022-06-23 15:43:39 +08:00
|
|
|
|
## 开启轮播循环
|
2022-06-27 16:06:15 +08:00
|
|
|
|
function fz:module/scoreboard/display/carousel/loop
|
2022-06-25 02:22:23 +08:00
|
|
|
|
|
|
|
|
|
## 日志
|
|
|
|
|
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已加载组件:计分板"}]
|