规范了事件系统,完成了实现计分板赋值逻辑
This commit is contained in:
1 parent
171b19c93a
commit
4665599abb
173 files changed
+1374
-276
No files matched your search
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
function #fz:module/config/reset_trigger
|
||||
|
||||
## 日志
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 调用者:fz:module/config/trigger
|
||||
|
||||
## 如果分数大于0说明玩家点击了按钮
|
||||
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/on_click
|
||||
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:event/module/config/on_click
|
||||
execute as @a if score @s fz.module.config.trigger matches 1.. run function #fz:module/config/reset_trigger
|
||||
|
||||
schedule function fz:module/config/loop 1t replace
|
||||
@@ -4,8 +4,7 @@
|
||||
## 调试
|
||||
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": "触发了配置功能"}]
|
||||
|
||||
## 监听计分板分数的循环,schedule是为了避免1tick内执行两次,但可有可无
|
||||
schedule function fz:module/config/loop 0t replace
|
||||
function fz:module/config/loop
|
||||
|
||||
## 显示按钮
|
||||
function #fz:module/config/display
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# 源计分板
|
||||
## 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.assign.general dummy
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,3 @@
|
||||
# 调用者:#fz:module/scoreboard/config/display/buttons
|
||||
|
||||
tellraw @s [[{"text": "[", "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": "]"}]]
|
||||
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,46 +0,0 @@
|
||||
## 创建显示计分板
|
||||
### 轮播
|
||||
team add fz.module.scoreboard.display.carousel
|
||||
|
||||
## 主计分板
|
||||
###### 判据均为dummy,便于升级维护!
|
||||
|
||||
### 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.general dummy
|
||||
team add fz.module.scoreboard.display.general
|
||||
|
||||
### 活跃度
|
||||
scoreboard objectives add fz.module.scoreboard.display.activation dummy
|
||||
team add fz.module.scoreboard.display.activation
|
||||
|
||||
### 飞行距离
|
||||
scoreboard objectives add fz.module.scoreboard.display.aviating_distance dummy
|
||||
team add fz.module.scoreboard.display.aviating_distance
|
||||
|
||||
### 抖M榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.damage_taken dummy
|
||||
team add fz.module.scoreboard.display.damage_taken
|
||||
|
||||
### 死亡榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.death_count dummy
|
||||
team add fz.module.scoreboard.display.death_count
|
||||
|
||||
### 挖掘榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.dig_count dummy
|
||||
team add fz.module.scoreboard.display.dig_count
|
||||
|
||||
### 钓鱼榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.fishing_count dummy
|
||||
team add fz.module.scoreboard.display.fishing_count
|
||||
|
||||
### 击杀榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.kill_count dummy
|
||||
team add fz.module.scoreboard.display.kill_count
|
||||
|
||||
### 放置榜
|
||||
scoreboard objectives add fz.module.scoreboard.placement_count dummy
|
||||
team add fz.module.scoreboard.display.placement_count
|
||||
|
||||
### 交易榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
|
||||
team add fz.module.scoreboard.display.trade_count
|
||||
@@ -1,9 +1,55 @@
|
||||
# 调用者:#fz:module/scoreboard/install
|
||||
|
||||
## 源计分板
|
||||
function fz:module/scoreboard/assign/create_scoreboards
|
||||
## 显示计分板
|
||||
function fz:module/scoreboard/display/create_scoreboards
|
||||
|
||||
### 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.assign.general dummy
|
||||
|
||||
## 轮播
|
||||
team add fz.module.scoreboard.display.carousel
|
||||
|
||||
## 创建显示计分板
|
||||
###### 判据均为dummy,便于升级维护!
|
||||
|
||||
### 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.general dummy
|
||||
team add fz.module.scoreboard.display.general
|
||||
|
||||
### 活跃度
|
||||
scoreboard objectives add fz.module.scoreboard.display.activation dummy
|
||||
team add fz.module.scoreboard.display.activation
|
||||
|
||||
### 飞行距离
|
||||
scoreboard objectives add fz.module.scoreboard.display.aviating_distance dummy
|
||||
team add fz.module.scoreboard.display.aviating_distance
|
||||
|
||||
### 抖M榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.damage_taken dummy
|
||||
team add fz.module.scoreboard.display.damage_taken
|
||||
|
||||
### 死亡榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.death_count dummy
|
||||
team add fz.module.scoreboard.display.death_count
|
||||
|
||||
### 挖掘榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.dig_count dummy
|
||||
team add fz.module.scoreboard.display.dig_count
|
||||
|
||||
### 钓鱼榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.fishing_count dummy
|
||||
team add fz.module.scoreboard.display.fishing_count
|
||||
|
||||
### 击杀榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.kill_count dummy
|
||||
team add fz.module.scoreboard.display.kill_count
|
||||
|
||||
### 放置榜
|
||||
scoreboard objectives add fz.module.scoreboard.placement_count dummy
|
||||
team add fz.module.scoreboard.display.placement_count
|
||||
|
||||
### 交易榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
|
||||
team add fz.module.scoreboard.display.trade_count
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fz:install_manager fz.module.scoreboard set value 1b
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 调用者:#fz:module/scoreboard/uninstall
|
||||
|
||||
## 关闭轮播循环
|
||||
schedule clear #fz:module/scoreboard/display/carousel_controller/loop
|
||||
schedule clear fz:module/scoreboard/display/carousel/loop
|
||||
|
||||
## 清除队伍
|
||||
### 轮播
|
||||
|
||||
Reference in new issue
Block a user