Files
fz-survival-datapack/data/fzsd/functions/logger/install.mcfunction
T
延皓 da7af9fc83 完善所有剩余功能,后续bug修复后即准备发布正式版并向下移植
- 将命名空间改为“fzsd”
- 完善交互器
- 添加管理员命令(/function admin.fzsd:<...>)
- 添加启动函数,用于自动升级等功能
- 添加重装、深度安装、深度卸载、深度重装函数
2022-07-30 16:34:38 +08:00

31 lines
2.2 KiB
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.
##### 使tellraw @a [{"nbt": "fzsd.exception.load_without_install_exception", "interpret": true, "storage": "fzsd:logger"}, {"text": "计分板"}]
##
data modify storage fzsd:logger fzsd.root set value '[{"text": "", "color": "white"}, {"text": "[", "color": "dark_gray"}, {"text": "FZSD", "color": "gold"}, {"text": "]", "color": "dark_gray"}]'
##
### error 800
data modify storage fzsd:logger fzsd.level.error set value '[{"text": "", "color": "red"}, {"nbt": "root", "interpret": true, "storage": "fzsd:logger"}, {"text": "[错误]"}]'
### alert 600
data modify storage fzsd:logger fzsd.level.alert set value '[{"text": "", "color": "yellow"}, {"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, {"text": "[提醒]"}]'
### info 500
data modify storage fzsd:logger fzsd.level.info set value '[{"text": "", "color": "green"}, {"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, {"text": "[信息]"}]'
### debug 400
data modify storage fzsd:logger fzsd.level.debug set value '[{"text": "", "color": "dark_aqua"}, {"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, {"text": "[调试]"}]'
### fine 300
data modify storage fzsd:logger fzsd.level.fine set value '[{"text": "", "color": "gray"}, {"nbt": "fzsd.root", "interpret": true, "storage": "fzsd:logger"}, {"text": "[详细]"}]'
##
data modify storage fzsd:logger fzsd.exception.load_without_install_exception set value '[{"nbt": "fzsd.level.error", "interpret": true, "storage": "fzsd:logger"}, {"text": "模块在未安装时被加载:"}]'
##
execute unless data storage fzsd:logger fzsd.levels.current run data modify storage fzsd:logger fzsd.levels.current set value 500
##
execute store result score fzsd.logger.level fzsd.variable.integer run data get storage fzsd:logger fzsd.levels.current
##
data modify storage fzsd:installed fzsd.logger set value 1b
##
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装系统组件:日志"}]