From fe9bba83682502022a037cd0020fb9125088e7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=B6=E7=9A=93?= <1214946206@qq.com> Date: Thu, 7 Jul 2022 08:07:25 +0800 Subject: [PATCH] fix #I5FJOG --- data/fz/functions/config/main.mcfunction | 4 ++-- data/fz/functions/config/turnon.mcfunction | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/fz/functions/config/main.mcfunction b/data/fz/functions/config/main.mcfunction index 4b87f9b..e0fd40d 100644 --- a/data/fz/functions/config/main.mcfunction +++ b/data/fz/functions/config/main.mcfunction @@ -2,7 +2,7 @@ #允许玩家操作config记分板 scoreboard players enable @a config #每条子函数都要reset config分数和function fz:config/display -execute if data storage fz.installed {sweeper: 1b} as @a if score @s config matches 1478966200..1478966217 run function fz:sweeper/config/trigger -execute if data storage fz.installed {scoreboards: 1b} as @a if score @s config matches 1838019368..1838019379 run function fz:scoreboards/config +execute if data storage fz:survival installed{sweeper: 1b} as @a if score @s config matches 1478966200..1478966217 run function fz:sweeper/config/trigger +execute if data storage fz:survival installed{scoreboards: 1b} as @a if score @s config matches 1838019368..1838019379 run function fz:scoreboards/config #循环执行本函数 schedule function fz:config/main 1t \ No newline at end of file diff --git a/data/fz/functions/config/turnon.mcfunction b/data/fz/functions/config/turnon.mcfunction index f322ebc..a6c51c7 100644 --- a/data/fz/functions/config/turnon.mcfunction +++ b/data/fz/functions/config/turnon.mcfunction @@ -5,6 +5,7 @@ scoreboard players reset @s config execute unless data storage fz.config {is_open: 1b} run function fz:config/main execute unless data storage fz.config {is_open: 1b} run scoreboard objectives add openingConfig dummy execute unless data storage fz.config {is_open: 1b} run data merge storage fz.config {is_open: 1b} +schedule function fz:config/timeout 300s replace #将该玩家加入打开设置页面的玩家的列表 scoreboard players set @s openingConfig 1 #将设置内容输出给玩家