This commit is contained in:
延皓
2022-06-23 20:06:15 +08:00
parent ff5d951fd1
commit 5c75fa4127
56 changed files with 200 additions and 37 deletions
+3
View File
@@ -0,0 +1,3 @@
{
}
+12
View File
@@ -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": "安装完成!"}]
+5
View File
@@ -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
@@ -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
-14
View File
@@ -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": "模块在未安装时被加载:"}]'
@@ -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
@@ -1,3 +1,3 @@
# 调用者: # 调用者:fz:module/scoreboard/config/on_click
team join fz.module.scoreboard.display.activation @s 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 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 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 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 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 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 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 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 team join fz.module.scoreboard.display.kill_count @s
@@ -1,3 +1,3 @@
# 调用者: # 调用者:fz:module/scoreboard/config/on_click
team leave @s team leave @s
@@ -1,3 +1,3 @@
# 调用者: # 调用者:fz:module/scoreboard/config/on_click
team join fz.module.scoreboard.display.trade_count @s team join fz.module.scoreboard.display.trade_count @s
@@ -1,4 +1,4 @@
# 调用者:fz:install # 调用者:#fz:module/scoreboard/install
## ##
###### dummy便 ###### dummy便
@@ -46,4 +46,4 @@ team add fz.module.scoreboard.display.trade_count
##### scoreboard objectives add fz.module.scoreboard.placement_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 # 调用者:#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:install_manager fz.module{scoreboard: 1b} run tellraw @a [{"nbt": "fz.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": "计分板"}]
## ##
function #fz:module/scoreboard/display/set_all_colors 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 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": "计分板已卸载!"}] 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"}}}] 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,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
+12
View File
@@ -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
View File
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:entry",
"replace": false,
"values": [
"fz:install"
]
}
+7
View File
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:entry",
"replace": false,
"values": [
"fz:load"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:logger/install"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:logger/uninstall"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/install",
"replace": false,
"values": [
"fz:config/install"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:module/try_load",
"replace": false,
"values": [
"fz:config/load"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/uninstall",
"replace": false,
"values": [
"fz:config/uninstall"
]
}
@@ -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, "replace": false,
"values": [ "values": [
"fz:module/scoreboard/clear_data" "fz:module/scoreboard/clear_data"
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/install",
"replace": false,
"values": [
"fz:module/scoreboard/install"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:module/try_load",
"replace": false,
"values": [
"fz:module/scoreboard/load"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/uninstall",
"replace": false,
"values": [
"fz:module/scoreboard/uninstall"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/install",
"replace": false,
"values": [
"fz:module/sweeper/install"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:module/try_load",
"replace": false,
"values": [
"fz:module/sweeper/load"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/uninstall",
"replace": false,
"values": [
"fz:module/sweeper/uninstall"
]
}
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:load",
"replace": false,
"values": [
"fz:module/try_load"
]
}
@@ -0,0 +1,9 @@
{
"__comment": "调用者:fz:uninstall",
"replace": false,
"values": [
"#fz:module/config/uninstall",
"#fz:module/scoreboard/uninstall",
"#fz:module/sweeper/uninstall"
]
}
+7
View File
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:entry",
"replace": false,
"values": [
"fz:uninstall"
]
}