继续完善config

This commit is contained in:
延皓
2022-06-24 09:11:37 +08:00
parent c5b36c5f50
commit 6f6ccb05be
18 changed files with 63 additions and 18 deletions
+1 -1
View File
@@ -2,6 +2,6 @@
0. 提供各种工具,位于fz.admin命名空间下,包括 0. 提供各种工具,位于fz.admin命名空间下,包括
0. 细化版本管理,提供不同版本之间的升级函数,由`update_manager`控制。*务必仔细测试再发布,一旦升级无法降级!* 0. 细化版本管理,提供不同版本之间的升级函数,由`update_manager`控制。*务必仔细测试再发布,一旦升级无法降级!*
0. 反馈、警告、报错和调试由`logger`控制。分别对应四个类:`info``warn``error``debug` 0. 反馈、警告、报错和调试由`logger`控制。分别对应四个类:`info``warn``error``debug`
0. 函数调用应尽可能使用标签! 0. 函数由两个以上的函数调用,或由不同包下的函数调用,或需要作为接口开放给下游数据包时,应改用标签调用
### 如果需要修改计分板颜色 ### 如果需要修改计分板颜色
+17 -3
View File
@@ -3,10 +3,24 @@
"login": { "login": {
"trigger": "tick", "trigger": "tick",
"conditions": { "conditions": {
"player": { "player": [
"" {
} "condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_scores",
"entity": "this",
"scores": {
"fz.event.leave_game": {
"max": 0
}
}
}
}
]
} }
} }
},
"rewards": {
"function": "fz:event/on_login"
} }
} }
+1 -6
View File
@@ -1,15 +1,10 @@
{ {
"parent": "fz:sneak",
"criteria": { "criteria": {
"unsneak": { "unsneak": {
"trigger": "tick", "trigger": "tick",
"conditions": { "conditions": {
"player": { "player": {
"type_specific": {
"type": "player",
"advancements": {
"fz:config/sneak": true
}
},
"flags": { "flags": {
"is_sneaking": false "is_sneaking": false
} }
+5 -1
View File
@@ -1,4 +1,8 @@
function #fz:event/on_login function #fz:event/on_login
scoreboard players reset @s fz.event.leave_game ##
advancement revoke @s until fz:unsneak
##
scoreboard players set @s fz.event.leave_game 0
advancement revoke @s only fz:login advancement revoke @s only fz:login
@@ -2,8 +2,7 @@
##### #####
function #fz:event/on_unsneak function #fz:event/on_unsneak
execute if entity @s[y_rotation = 90] run function #fz:module/config/trigger execute if entity @s[y_rotation = 90] run function #fz:event/config/on_trigger
## ##
advancement revoke @s only fz:sneak advancement revoke @s until fz:unsneak
advancement revoke @s only fz:unsneak
+1
View File
@@ -1,5 +1,6 @@
# 调用者:#fz:install # 调用者:#fz:install
function #fz:event/install
function #fz:logger/install function #fz:logger/install
## ##
@@ -1,9 +1,10 @@
# 调用者:#fz:module/config/on_click # 调用者:#fz:module/config/on_click
##### #####
execute if score @s fz.module.config.trigger matches 1000..1099 run function #fz:module/scoreboard/config/on_click execute if score @s fz.module.config.trigger matches 1000..1999 run function #fz:module/scoreboard/config/on_click
## ##
function #fz:module/config/reset_trigger
## ##
function #fz:module/config/display function #fz:module/config/display
@@ -0,0 +1,3 @@
# 调用者:#fz:module/config/reset_trigger
scoreboard players reset @s fz.module.config.trigger
@@ -1,3 +1,3 @@
# 调用者:#fz:module/scoreboard/config/display/buttons # 调用者:#fz:module/scoreboard/config/display/buttons
tellraw @s [{"text": "- "}, {"text": "[关]", "color": "dark_red", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1000"}}, {"text": "[总榜]", "color": "dark_aqua", "hoverEvent": {"action": "show_text", "contents": {"text": "总榜", "color": "dark_aqua"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1001"}}] tellraw @s [{"text": "- "}, {"text": "[关]", "color": "dark_red", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1000"}}, {"text": "[总榜]", "color": "dark_aqua", "hoverEvent": {"action": "show_text", "contents": {"text": "总榜", "color": "dark_aqua"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1010"}}, {"text": "[活跃度]", "color": "aqua", "hoverEvent": {"action": "show_text", "contents": {"text": "活跃度", "color": "aqua"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1020"}}, {"text": "[飞行距离]", "color": "light_purple", "hoverEvent": {"action": "show_text", "contents": {"text": "飞行距离", "color": "light_purple"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1030"}}]
+2
View File
@@ -5,6 +5,8 @@ function #fz:module/uninstall
## ##
scoreboard objectives remove fz.variable.integer scoreboard objectives remove fz.variable.integer
function #fz:event/uninstall
## 使1tick卸载 ## 使1tick卸载
schedule function #fz:logger/uninstall 1t replace schedule function #fz:logger/uninstall 1t replace
@@ -0,0 +1,7 @@
{
"__comment": "调用者:fz:event/on_unsneak,当玩家抬头到最高角度并蹲起后,触发此事件",
"replace": false,
"values": [
"#fz:module/config/trigger"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:event/install"
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"fz:module/config/reset_trigger" "#fz:module/config/reset_trigger"
] ]
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:event/uninstall"
]
}
@@ -1,4 +1,5 @@
{ {
"__comment": "调用者:fz:module/config/on_click、fz:module/config/trigger",
"replace": false, "replace": false,
"values": [ "values": [
"#fz:module/scoreboard/config/display/head", "#fz:module/scoreboard/config/display/head",
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/config/reset_trigger"
]
}
@@ -1,5 +1,4 @@
{ {
"__comment": "调用者:fz:event/config/on_triggered,当玩家抬头到最高角度并蹲起后,触发此事件",
"replace": false, "replace": false,
"values": [ "values": [
"fz:module/config/trigger" "fz:module/config/trigger"
@@ -1,4 +1,5 @@
{ {
"__comment": "调用者:fz:module/config/on_click",
"replace": false, "replace": false,
"values": [ "values": [
"fz:module/scoreboard/config/on_click" "fz:module/scoreboard/config/on_click"