添加分数恢复脚本

This commit is contained in:
延皓
2022-07-26 07:57:04 +08:00
parent 5520832d55
commit 3ce37c9abf
29 changed files with 331 additions and 129 deletions
@@ -1,3 +1,3 @@
# 本目录用于存放向事件中注册的函数,并不用来新建事件
execute if score @s fz.module.interactor.player.config matches 1 if entity @s[x_rotation = -90] run function #fz:module/interactor/display
execute unless score @s fz.module.interactor.player.config matches -1 if entity @s[x_rotation = -90] run function #fz:module/interactor/display
@@ -3,5 +3,5 @@ execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @
execute if data storage fz:installed fz.module{last_death:1b} run tellraw @s {"text": "交互器打开方式:"}
execute if data storage fz:installed fz.module{last_death:1b} if score @s fz.module.interactor.player.config matches 1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 900"}},{"text": "已开启", "color": "green"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} unless score @s fz.module.interactor.player.config matches 1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击开启"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} unless score @s fz.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击关闭"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 900"}},{"text": "已开启", "color": "green"},{"text": "]"}]]
execute if data storage fz:installed fz.module{last_death:1b} if score @s fz.module.interactor.player.config matches -1 run tellraw @s [{"text": "- 抬头+蹲起:"}, [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "点击开启"}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 910"}},{"text": "已关闭", "color": "red"},{"text": "]"}]]
@@ -3,6 +3,6 @@
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "的交互器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.interactor.trigger"}}]
execute if score @s fz.module.interactor.trigger matches 900 run scoreboard players set @s fz.module.interactor.player.config 0
execute if score @s fz.module.interactor.trigger matches 900 run scoreboard players set @s fz.module.interactor.player.config -1
execute if score @s fz.module.interactor.trigger matches 910 run scoreboard players set @s fz.module.interactor.player.config 1
execute if score @s fz.module.interactor.trigger matches 910 run scoreboard players set @s fz.module.interactor.player.config 0
@@ -1,6 +1,6 @@
# 调用者:#fz:module/interactor/reset_trigger
scoreboard players reset @s fz.module.interactor.trigger
scoreboard players set @s fz.module.interactor.trigger 0
scoreboard players enable @s fz.module.interactor.trigger
##
@@ -20,5 +20,27 @@ scoreboard objectives remove fz.module.scoreboard.display.kill_count
###
scoreboard objectives remove fz.module.scoreboard.display.trade_count
##
###
team remove fz.module.scoreboard.display.carousel
###
team remove fz.module.scoreboard.display.general
###
team remove fz.module.scoreboard.display.activation
###
team remove fz.module.scoreboard.display.aviating_distance
###
team remove fz.module.scoreboard.display.damage_taken
###
team remove fz.module.scoreboard.display.death_count
###
team remove fz.module.scoreboard.display.dig_count
###
team remove fz.module.scoreboard.display.fishing_count
###
team remove fz.module.scoreboard.display.kill_count
###
team remove fz.module.scoreboard.display.trade_count
##
execute if score fz.logger.level fz.variable.integer matches ..500 run tellraw @a [{"nbt": "level.info", "interpret": true, "storage": "fz:logger"}, {"text": "已删除计分板数据!"}]
@@ -51,6 +51,11 @@ team add fz.module.scoreboard.display.placement_count
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
team add fz.module.scoreboard.display.trade_count
team add fz.module.scoreboard.fake
team add fz.module.scoreboard.shadow
team modify fz.module.scoreboard.fake prefix {"text": "假的"}
team modify fz.module.scoreboard.shadow prefix {"text": "挂机"}
##
data modify storage fz:installed fz.module.scoreboard set value 1b
@@ -3,28 +3,6 @@
##
schedule clear fz:module/scoreboard/display/carousel/loop
##
###
team remove fz.module.scoreboard.display.carousel
###
team remove fz.module.scoreboard.display.general
###
team remove fz.module.scoreboard.display.activation
###
team remove fz.module.scoreboard.display.aviating_distance
###
team remove fz.module.scoreboard.display.damage_taken
###
team remove fz.module.scoreboard.display.death_count
###
team remove fz.module.scoreboard.display.dig_count
###
team remove fz.module.scoreboard.display.fishing_count
###
team remove fz.module.scoreboard.display.kill_count
###
team remove fz.module.scoreboard.display.trade_count
##
scoreboard objectives setdisplay sidebar.team.aqua
scoreboard objectives setdisplay sidebar.team.black
@@ -43,6 +21,9 @@ scoreboard objectives setdisplay sidebar.team.red
scoreboard objectives setdisplay sidebar.team.white
scoreboard objectives setdisplay sidebar.team.yellow
team remove fz.module.scoreboard.fake
team remove fz.module.scoreboard.shadow
##
execute if score fz.logger.level fz.variable.integer matches ..600 run tellraw @s [{"nbt": "fz.level.alert", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]", "color": "dark_red", "clickEvent": {"action": "suggest_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "将命令填入聊天框"}}}]