fz-survival-datapack/data/fz/functions/logger/install.mcfunction

17 lines
1.4 KiB
Mcfunction
Raw Normal View History

2022-06-23 20:06:15 +08:00
# 调用者:#fz:logger/install
##### 使用方式形如tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
## 前缀
### 根
data modify storage fz:logger fz.root set value '[{"text": "", "color": "white"}, {"text": "[", "color": "dark_gray"}, {"text": "FZD", "color": "gold"}, {"text": "]", "color": "dark_gray"}]'
### 不同日志等级
data modify storage fz:logger fz.level.debug set value '[{"text": "", "color": "dark_aqua"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[调试]"}]'
data modify storage fz:logger fz.level.info set value '[{"text": "", "color": "green"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[信息]"}]'
data modify storage fz:logger fz.level.warn set value '[{"text": "", "color": "yellow"}, {"nbt": "fz.root", "interpret": true, "storage": "fz:logger"}, {"text": "[警告]"}]'
data modify storage fz:logger fz.level.error set value '[{"text": "", "color": "red"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[错误]"}]'
## 异常
data modify storage fz:logger fz.exception.load_without_install_exception set value '[{"nbt": "fz.level.error", "interpret": true, "storage": "fz:logger"}, {"text": "模块在未安装时被加载:"}]'
## 默认关闭调试
execute unless data storage fz:logger fz.debug run data modify storage fz:logger fz.debug set value 0b