.
This commit is contained in:
parent
ff5d951fd1
commit
5c75fa4127
3
data/fz/advancements/config/sneak.json
Normal file
3
data/fz/advancements/config/sneak.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
@ -1,2 +1,14 @@
|
||||
# 调用者:#fz:install
|
||||
|
||||
function #fz:logger/install
|
||||
|
||||
## 整数类型
|
||||
scoreboard objectives add fz.variable.integer dummy
|
||||
scoreboard objectives add fz.variable.integer dummy
|
||||
|
||||
## 安装模块
|
||||
function #fz:module/install
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fz:install_manager fz.global set value 1b
|
||||
|
||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "安装完成!"}]
|
@ -0,0 +1,5 @@
|
||||
# 调用者:#fz:load
|
||||
|
||||
function #fz:module/try_load
|
||||
|
||||
tellraw @a [{"nbt": "fz.level.info", "interpret": true, "storage": "fz:logger"}, {"text": "加载完成!"}]
|
@ -0,0 +1 @@
|
||||
data modify storage fz:logger fz.debug set value 0b
|
@ -0,0 +1 @@
|
||||
data modify storage fz:logger fz.debug set value 1b
|
17
data/fz/functions/logger/install.mcfunction
Normal file
17
data/fz/functions/logger/install.mcfunction
Normal file
@ -0,0 +1,17 @@
|
||||
# 调用者:#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
|
@ -1,14 +0,0 @@
|
||||
# 调用者:#fz:logger/load
|
||||
##### 使用方式,形如:tellraw @a [{"nbt": "exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
||||
|
||||
## 前缀
|
||||
### 根
|
||||
data modify storage fz:logger root set value '[{"text": "", "color": "white"}, {"text": "[", "color": "dark_gray"}, {"text": "FZD", "color": "gold"}, {"text": "]", "color": "dark_gray"}]'
|
||||
### 不同日志等级
|
||||
data modify storage fz:logger level.debug set value '[{"text": "", "color": "dark_aqua"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[调试]"}]'
|
||||
data modify storage fz:logger level.info set value '[{"text": "", "color": "green"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[信息]"}]'
|
||||
data modify storage fz:logger level.warn set value '[{"text": "", "color": "yellow"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[警告]"}]'
|
||||
data modify storage fz:logger level.error set value '[{"text": "", "color": "red"}, {"nbt": "root", "interpret": true, "storage": "fz:logger"}, {"text": "[错误]"}]'
|
||||
|
||||
## 异常
|
||||
data modify storage fz:logger exception.load_without_install_exception set value '[{"nbt": "log.error", "interpret": true, "storage": "fz:logger"}, {"text": "模块在未安装时被加载:"}]'
|
3
data/fz/functions/logger/uninstall.mcfunction
Normal file
3
data/fz/functions/logger/uninstall.mcfunction
Normal file
@ -0,0 +1,3 @@
|
||||
## 调用者:#fz:logger/uninstall
|
||||
|
||||
data remove storage fz:logger fz
|
@ -1,4 +0,0 @@
|
||||
## 调用者:fz:uninstall
|
||||
|
||||
data remove storage fz:logger log
|
||||
data remove storage fz:logger exception
|
0
data/fz/functions/module/config/buttons.mcfunction
Normal file
0
data/fz/functions/module/config/buttons.mcfunction
Normal file
0
data/fz/functions/module/config/install.mcfunction
Normal file
0
data/fz/functions/module/config/install.mcfunction
Normal file
0
data/fz/functions/module/config/load.mcfunction
Normal file
0
data/fz/functions/module/config/load.mcfunction
Normal file
0
data/fz/functions/module/config/on_click.mcfunction
Normal file
0
data/fz/functions/module/config/on_click.mcfunction
Normal file
0
data/fz/functions/module/config/trigger.mcfunction
Normal file
0
data/fz/functions/module/config/trigger.mcfunction
Normal file
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.activation @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.aviating_distance @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.carousel @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.damage_taken @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.death_count @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.dig_count @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.fishing_count @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.general @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.kill_count @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team leave @s
|
@ -1,3 +1,3 @@
|
||||
# 调用者:
|
||||
# 调用者:fz:module/scoreboard/config/on_click
|
||||
|
||||
team join fz.module.scoreboard.display.trade_count @s
|
@ -1,4 +1,4 @@
|
||||
# 调用者:fz:install
|
||||
# 调用者:#fz:module/scoreboard/install
|
||||
|
||||
## 主计分板
|
||||
###### 判据均为dummy,便于升级维护!
|
||||
@ -46,4 +46,4 @@ team add fz.module.scoreboard.display.trade_count
|
||||
##### scoreboard objectives add fz.module.scoreboard.placement_count 需要穷举,暂不考虑
|
||||
|
||||
# 标记为已安装
|
||||
data modify storage fz:module scoreboard.installed set value 1b
|
||||
data modify storage fz:install_manager fz.module.scoreboard set value 1b
|
||||
|
@ -1,8 +1,7 @@
|
||||
# 调用者:#fz:module/scoreboard/load
|
||||
|
||||
## 异常检测
|
||||
execute if data storage fz:storage module.scoreboard{installed: 1b} run tellraw @a [{"nbt": "exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
||||
execute unless data storage fz:storage module.scoreboard.installed run tellraw @a [{"nbt": "exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
||||
execute unless data storage fz:install_manager fz.module{scoreboard: 1b} run tellraw @a [{"nbt": "fz.exception.load_without_install_exception", "interpret": true, "storage": "fz:logger"}, {"text": "计分板"}]
|
||||
|
||||
## 设置显示颜色
|
||||
function #fz:module/scoreboard/display/set_all_colors
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 调用者:fz:uninstall
|
||||
# 调用者:#fz:module/scoreboard/uninstall
|
||||
|
||||
## 关闭轮播循环
|
||||
schedule clear #fz:module/scoreboard/display/carousel_controller/loop
|
||||
@ -28,8 +28,8 @@ team remove fz.module.scoreboard.display.trade_count
|
||||
## 日志
|
||||
tellraw @a [{"nbt": "level.info", "interpret": true, "storage": "fz:logger"}, {"text": "计分板已卸载!"}]
|
||||
|
||||
## 询问是否清除数据function
|
||||
## 询问是否清除数据
|
||||
tellraw @s [{"nbt": "level.warn", "interpret": true, "storage": "fz:logger"}, {"text": "您要删除计分板数据吗,它将会永久失去!(真的很久!)"}, {"text": "[确定]","clickEvent": {"action": "run_command", "value": "/function #fz:module/scoreboard/clear_data"}, "hoverEvent": {"action": "show_text", "contents": {"text": "删除计分板,它将会永久失去!(真的很久!)", "color": "red"}}}]
|
||||
|
||||
# 标记为已卸载
|
||||
data modify storage fz:module scoreboard.installed set value 0b
|
||||
data modify storage fz:install_manager fz.module.scoreboard set value 0b
|
||||
|
0
data/fz/functions/module/sweeper/load.mcfunction
Normal file
0
data/fz/functions/module/sweeper/load.mcfunction
Normal file
6
data/fz/functions/module/try_load.mcfunction
Normal file
6
data/fz/functions/module/try_load.mcfunction
Normal file
@ -0,0 +1,6 @@
|
||||
# 调用者:#fz:module/try_load
|
||||
|
||||
## 判断是否安装,如果安装则加载
|
||||
execute if data storage fz:install_manager fz.module{config:1b} run function #fz:module/config/load
|
||||
execute if data storage fz:install_manager fz.module{scoreboard:1b} run function #fz:module/scoreboard/load
|
||||
execute if data storage fz:install_manager fz.module{sweeper:1b} run function #fz:module/sweeper/load
|
@ -0,0 +1,12 @@
|
||||
# 调用者:#fz:uninstall
|
||||
|
||||
function #fz:module/uninstall
|
||||
|
||||
## 整数类型
|
||||
scoreboard objectives remove fz.variable.integer
|
||||
|
||||
## 卸载日志,为避免扩展数据包在卸载时无法使用日志,故延迟1tick卸载
|
||||
schedule function #fz:logger/uninstall 1t replace
|
||||
|
||||
## 标记为已卸载
|
||||
data modify storage fz:install_manager fz.global set value 0b
|
7
data/fz/tags/functions/install.json
Normal file
7
data/fz/tags/functions/install.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:entry",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:install"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/load.json
Normal file
7
data/fz/tags/functions/load.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:entry",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:load"
|
||||
]
|
||||
}
|
6
data/fz/tags/functions/logger/install.json
Normal file
6
data/fz/tags/functions/logger/install.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:logger/install"
|
||||
]
|
||||
}
|
6
data/fz/tags/functions/logger/uninstall.json
Normal file
6
data/fz/tags/functions/logger/uninstall.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:logger/uninstall"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/config/install.json
Normal file
7
data/fz/tags/functions/module/config/install.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/install",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/install"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/config/load.json
Normal file
7
data/fz/tags/functions/module/config/load.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:module/try_load",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/load"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/config/uninstall.json
Normal file
7
data/fz/tags/functions/module/config/uninstall.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/uninstall"
|
||||
]
|
||||
}
|
9
data/fz/tags/functions/module/install.json
Normal file
9
data/fz/tags/functions/module/install.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"__comment": "调用者:fz:install",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#fz:module/config/install",
|
||||
"#fz:module/scoreboard/install",
|
||||
"#fz:module/sweeper/install"
|
||||
]
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"__comment": "调用者:fz:module:scoreboard/uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/clear_data"
|
||||
|
7
data/fz/tags/functions/module/scoreboard/install.json
Normal file
7
data/fz/tags/functions/module/scoreboard/install.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/install",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/install"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/scoreboard/load.json
Normal file
7
data/fz/tags/functions/module/scoreboard/load.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:module/try_load",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/load"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/scoreboard/uninstall.json
Normal file
7
data/fz/tags/functions/module/scoreboard/uninstall.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/uninstall"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/sweeper/install.json
Normal file
7
data/fz/tags/functions/module/sweeper/install.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/install",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/sweeper/install"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/sweeper/load.json
Normal file
7
data/fz/tags/functions/module/sweeper/load.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:module/try_load",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/sweeper/load"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/sweeper/uninstall.json
Normal file
7
data/fz/tags/functions/module/sweeper/uninstall.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/sweeper/uninstall"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/try_load.json
Normal file
7
data/fz/tags/functions/module/try_load.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:load",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/try_load"
|
||||
]
|
||||
}
|
9
data/fz/tags/functions/module/uninstall.json
Normal file
9
data/fz/tags/functions/module/uninstall.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"__comment": "调用者:fz:uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#fz:module/config/uninstall",
|
||||
"#fz:module/scoreboard/uninstall",
|
||||
"#fz:module/sweeper/uninstall"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/uninstall.json
Normal file
7
data/fz/tags/functions/uninstall.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:fz:entry",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:uninstall"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user