fz-survival-datapack/data/fz/functions/config/turnon.mcfunction
2021-07-03 06:21:34 +08:00

11 lines
723 B
Mcfunction
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#触发函数由成就和unsneak函数控制
#重置玩家的config分数避免开启设置功能后由于该玩家先前的分数而直接运行某些功能
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}
#将该玩家加入打开设置页面的玩家的列表
scoreboard players set @s openingConfig 1
#将设置内容输出给玩家
function fz:config/display