实现交互按钮

This commit is contained in:
延皓
2022-07-19 20:53:53 +08:00
parent 7b2136c282
commit 90a4a61855
118 changed files with 378 additions and 252 deletions
@@ -1,3 +0,0 @@
# 调用者:#fz:module/scoreboard/config/display/buttons
execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1000"}}, {"text": "", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1010"}}, {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1020"}}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1030"}}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1040"}}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1050"}}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1060"}}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1070"}}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1080"}}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1090"}}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.config.trigger set 1100"}}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}, {"text": "]"}]]
@@ -1,14 +0,0 @@
execute if score @s fz.module.config.trigger matches 1000 run function #fz:module/scoreboard/config/subscribe/off
execute if score @s fz.module.config.trigger matches 1010 run function #fz:module/scoreboard/config/subscribe/carousel
execute if score @s fz.module.config.trigger matches 1020 run function #fz:module/scoreboard/config/subscribe/general
execute if score @s fz.module.config.trigger matches 1030 run function #fz:module/scoreboard/config/subscribe/activation
execute if score @s fz.module.config.trigger matches 1040 run function #fz:module/scoreboard/config/subscribe/aviating_distance
execute if score @s fz.module.config.trigger matches 1050 run function #fz:module/scoreboard/config/subscribe/damage_taken
execute if score @s fz.module.config.trigger matches 1060 run function #fz:module/scoreboard/config/subscribe/death_count
execute if score @s fz.module.config.trigger matches 1070 run function #fz:module/scoreboard/config/subscribe/dig_count
execute if score @s fz.module.config.trigger matches 1080 run function #fz:module/scoreboard/config/subscribe/fishing_count
execute if score @s fz.module.config.trigger matches 1090 run function #fz:module/scoreboard/config/subscribe/kill_count
execute if score @s fz.module.config.trigger matches 1100 run function #fz:module/scoreboard/config/subscribe/trade_count
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "点击了计分板配置按钮,触发器分数为:"}, {"score": {"name": "@s", "objective": "fz.module.config.trigger"}}]
@@ -1,3 +1,3 @@
# 调用者:#fz:module/scoreboard/config/display/head
# 调用者:#fz:module/scoreboard/interactor/display
execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s {"text": "计分板:"}
@@ -0,0 +1,3 @@
# 调用者:#fz:module/scoreboard/interactor/display
execute if data storage fz:installed fz.module{scoreboard:1b} run tellraw @s [[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "contents": {"text": "", "color": "dark_red"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1000"}}, {"text": "", "color": "dark_red"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1010"}}, {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}, {"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1020"}}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1030"}}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1040"}}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1050"}}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1060"}}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1070"}}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1080"}}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1090"}}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"},{"text": "]"}], [{"text": "[", "hoverEvent": {"action": "show_text", "contents": {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}}, "clickEvent": {"action": "run_command", "value": "/trigger fz.module.interactor.trigger set 1100"}}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}, {"text": "]"}]]
@@ -0,0 +1,11 @@
execute if score @s fz.module.interactor.trigger matches 1000 run function #fz:module/scoreboard/interactor/subscribe/off
execute if score @s fz.module.interactor.trigger matches 1010 run function #fz:module/scoreboard/interactor/subscribe/carousel
execute if score @s fz.module.interactor.trigger matches 1020 run function #fz:module/scoreboard/interactor/subscribe/general
execute if score @s fz.module.interactor.trigger matches 1030 run function #fz:module/scoreboard/interactor/subscribe/activation
execute if score @s fz.module.interactor.trigger matches 1040 run function #fz:module/scoreboard/interactor/subscribe/aviating_distance
execute if score @s fz.module.interactor.trigger matches 1050 run function #fz:module/scoreboard/interactor/subscribe/damage_taken
execute if score @s fz.module.interactor.trigger matches 1060 run function #fz:module/scoreboard/interactor/subscribe/death_count
execute if score @s fz.module.interactor.trigger matches 1070 run function #fz:module/scoreboard/interactor/subscribe/dig_count
execute if score @s fz.module.interactor.trigger matches 1080 run function #fz:module/scoreboard/interactor/subscribe/fishing_count
execute if score @s fz.module.interactor.trigger matches 1090 run function #fz:module/scoreboard/interactor/subscribe/kill_count
execute if score @s fz.module.interactor.trigger matches 1100 run function #fz:module/scoreboard/interactor/subscribe/trade_count
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.activation @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.activation @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.activation", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.aviating_distance @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.aviating_distance @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.aviating_distance", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.carousel @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.carousel @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.carousel", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.damage_taken @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.damage_taken @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.damage_taken", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.death_count @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.death_count @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.death_count", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.dig_count @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.dig_count @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.dig_count", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.fishing_count @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.fishing_count @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.fishing_count", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.general @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.general @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.general", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.kill_count @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.kill_count @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.kill_count", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]
@@ -1,6 +1,6 @@
# 调用者:#fz:module/scoreboard/config/subscribe/~
team leave @s
##
# 调用者:#fz:module/scoreboard/interactor/subscribe/~
team leave @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "取消了计分板订阅"}]
@@ -1,4 +1,4 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.placement_count @s
@@ -1,6 +1,6 @@
# 调用者:fz:module/scoreboard/config/subscribe/~
team join fz.module.scoreboard.display.trade_count @s
##
# 调用者:fz:module/scoreboard/interactor/subscribe/~
team join fz.module.scoreboard.display.trade_count @s
##
execute if score fz.logger.level fz.variable.integer matches ..400 run tellraw @a [{"nbt": "fz.level.debug", "interpret": true, "storage": "fz:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "订阅了"}, {"nbt": "fz.scoreboard.text.trade_count", "interpret": true, "storage": "fz:module"}, {"text": "计分板"}]