This commit is contained in:
延皓 2022-06-24 08:11:36 +08:00
parent a2a9d874f7
commit c5b36c5f50
19 changed files with 64 additions and 8 deletions

View File

@ -0,0 +1,12 @@
{
"criteria": {
"login": {
"trigger": "tick",
"conditions": {
"player": {
""
}
}
}
}
}

View File

@ -0,0 +1 @@
scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game

View File

@ -0,0 +1,4 @@
function #fz:event/on_login
scoreboard players reset @s fz.event.leave_game
advancement revoke @s only fz:login

View File

@ -0,0 +1 @@
scoreboard objectives remove fz.event.leave_game

View File

@ -1 +1 @@
scoreboard objectives add fz.module.config.trigger
scoreboard objectives add fz.module.config.trigger dummy

View File

@ -1,7 +1,9 @@
# 调用者#fz:module/config/on_click
##### 处理玩家点击事件并进行下一步操作
execute if score @s fz.module.config.trigger matches 1000..1099 run function #fz:module/scoreboard/config/on_click
## 重置玩家的触发器分数
## 重新显示一次按钮
function #fz:module/config/buttons
function #fz:module/config/display

View File

@ -1,11 +1,11 @@
# 调用者#fz:module/config/on_trigger
# 调用者#fz:module/config/trigger
##### 玩家抬头到最高角度并蹲起后触发此函数
## 监听计分板分数的循环schedule是为了避免1tick内执行两次但可有可无
schedule function fz:module/config/loop 0t replace
## 显示按钮
function #fz:module/config/buttons
function #fz:module/config/display
## 设置或重制超时时间
schedule function #fz:module/config/timeout 300s replace

View File

@ -0,0 +1,3 @@
schedule clear fz:module/config/loop
scoreboard objectives remove fz.module.config.trigger

View File

@ -0,0 +1,3 @@
# 调用者#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"}}]

View File

@ -0,0 +1,3 @@
# 调用者#fz:module/scoreboard/config/display/head
tellraw @s {"text": "计分板:"}

View File

@ -1,6 +1,6 @@
{
"replace": false,
"values": [
"fz:module/config/buttons"
"fz:module/config/reset_trigger"
]
}

View File

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"#fz:module/scoreboard/config/display/head",
"#fz:module/scoreboard/config/display/buttons"
]
}

View File

@ -2,6 +2,6 @@
"__comment": "调用者:#fz:module/install",
"replace": false,
"values": [
"fz:config/install"
"fz:module/config/install"
]
}

View File

@ -2,6 +2,6 @@
"__comment": "调用者fz:module/try_load",
"replace": false,
"values": [
"fz:config/load"
"fz:module/config/load"
]
}

View File

@ -2,6 +2,6 @@
"__comment": "调用者:#fz:module/uninstall",
"replace": false,
"values": [
"fz:config/uninstall"
"fz:module/config/uninstall"
]
}

View File

@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/config/display",
"replace": false,
"values": [
"fz:module/scoreboard/config/display/buttons"
]
}

View File

@ -0,0 +1,7 @@
{
"__comment": "调用者:#fz:module/config/display",
"replace": false,
"values": [
"fz:module/scoreboard/config/display/head"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fz:module/scoreboard/config/on_click"
]
}