support mc1.21;需要放弃支持mc1.20
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
scoreboard objectives add fzsd.module.health health
|
||||
scoreboard objectives modify fzsd.module.health rendertype hearts
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:install fzsd.module.health set value 1b
|
||||
|
||||
## 日志
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已安装组件:血量显示"}]
|
||||
@@ -0,0 +1,7 @@
|
||||
execute unless data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name fzsd.module.health
|
||||
execute if data storage fzsd:config fzsd.module.health.display{below_name: 0b} run scoreboard objectives setdisplay below_name
|
||||
execute unless data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list fzsd.module.health
|
||||
execute if data storage fzsd:config fzsd.module.health.display{list: 0b} run scoreboard objectives setdisplay list
|
||||
|
||||
## 日志
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已加载组件:玩家血量显示"}]
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "血量", "color": "red"}
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "HP"}
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "厘米", "color": "gold"}
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "cm", "color": "gold"}
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "节操值", "color": "green"}
|
||||
@@ -0,0 +1 @@
|
||||
scoreboard objectives modify fzsd.module.health displayname {"text": "沙雕值", "color": "yellow"}
|
||||
@@ -0,0 +1 @@
|
||||
execute unless data storage fzsd:install fzsd.module{health:0b} run function #fzsd:module/health/install
|
||||
@@ -0,0 +1,2 @@
|
||||
## 判断是否安装,如果安装则加载
|
||||
execute if data storage fzsd:install fzsd.module{health:1b} run function #fzsd:module/health/load
|
||||
@@ -0,0 +1,9 @@
|
||||
scoreboard objectives remove fzsd.module.health
|
||||
data remove storage fzsd:config fzsd.module.health
|
||||
|
||||
## 标记为已卸载
|
||||
data modify storage fzsd:install fzsd.module.health set value 0b
|
||||
|
||||
|
||||
## 日志
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..500 run tellraw @a [{"nbt": "fzsd.level.info", "interpret": true, "storage": "fzsd:logger"}, {"text": "已卸载组件:血量显示"}]
|
||||
Reference in New Issue
Block a user