.
This commit is contained in:
parent
a2a9d874f7
commit
c5b36c5f50
12
data/fz/advancements/login.json
Normal file
12
data/fz/advancements/login.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"criteria": {
|
||||
"login": {
|
||||
"trigger": "tick",
|
||||
"conditions": {
|
||||
"player": {
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
data/fz/functions/event/install.mcfunction
Normal file
1
data/fz/functions/event/install.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives add fz.event.leave_game minecraft.custom:leave_game
|
4
data/fz/functions/event/on_login.mcfunction
Normal file
4
data/fz/functions/event/on_login.mcfunction
Normal file
@ -0,0 +1,4 @@
|
||||
function #fz:event/on_login
|
||||
|
||||
scoreboard players reset @s fz.event.leave_game
|
||||
advancement revoke @s only fz:login
|
1
data/fz/functions/event/uninstall.mcfunction
Normal file
1
data/fz/functions/event/uninstall.mcfunction
Normal file
@ -0,0 +1 @@
|
||||
scoreboard objectives remove fz.event.leave_game
|
@ -1 +1 @@
|
||||
scoreboard objectives add fz.module.config.trigger
|
||||
scoreboard objectives add fz.module.config.trigger dummy
|
@ -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
|
@ -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
|
@ -0,0 +1,3 @@
|
||||
schedule clear fz:module/config/loop
|
||||
|
||||
scoreboard objectives remove fz.module.config.trigger
|
@ -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"}}]
|
@ -0,0 +1,3 @@
|
||||
# 调用者:#fz:module/scoreboard/config/display/head
|
||||
|
||||
tellraw @s {"text": "计分板:"}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/config/buttons"
|
||||
"fz:module/config/reset_trigger"
|
||||
]
|
||||
}
|
7
data/fz/tags/functions/module/config/display.json
Normal file
7
data/fz/tags/functions/module/config/display.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#fz:module/scoreboard/config/display/head",
|
||||
"#fz:module/scoreboard/config/display/buttons"
|
||||
]
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
"__comment": "调用者:#fz:module/install",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/install"
|
||||
"fz:module/config/install"
|
||||
]
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
"__comment": "调用者:fz:module/try_load",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/load"
|
||||
"fz:module/config/load"
|
||||
]
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
"__comment": "调用者:#fz:module/uninstall",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:config/uninstall"
|
||||
"fz:module/config/uninstall"
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/config/display",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/config/display/buttons"
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"__comment": "调用者:#fz:module/config/display",
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/config/display/head"
|
||||
]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/config/on_click"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user