- 将命名空间改为“fzsd”
- 完善交互器 - 添加管理员命令(/function admin.fzsd:<...>) - 添加启动函数,用于自动升级等功能 - 添加重装、深度安装、深度卸载、深度重装函数
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
data modify storage fzsd:global fzsd.api.dimension.id set from entity @s LastDeathLocation.dimension
|
||||
execute store result storage fzsd:last_death fzsd.x int 1 run data get entity @s LastDeathLocation.pos[0]
|
||||
execute store result storage fzsd:last_death fzsd.y int 1 run data get entity @s LastDeathLocation.pos[1]
|
||||
execute store result storage fzsd:last_death fzsd.z int 1 run data get entity @s LastDeathLocation.pos[2]
|
||||
|
||||
## 调试
|
||||
execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "玩家"}, {"selector": "@s"}, {"text": "获取了死亡点"}]
|
||||
@@ -0,0 +1,5 @@
|
||||
## 标记为已安装
|
||||
data modify storage fzsd:installed fzsd.module.last_death 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 @@
|
||||
execute if data storage fzsd:installed fzsd.module{last_death:1b} run tellraw @s [{"text": "获取上一死亡点:"},[{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:自己"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2100"}},{"text": "私信", "color": "aqua"},{"text": "]"}]]
|
||||
@@ -0,0 +1 @@
|
||||
execute if score @s fzsd.module.interactor.trigger matches -2100 run function #fzsd:module/last_death/private_message
|
||||
@@ -0,0 +1,2 @@
|
||||
execute if data entity @s LastDeathLocation run tellraw @s [{"text": "你上次死亡于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_death"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_death"}, {"text": "]"}]]
|
||||
execute unless data entity @s LastDeathLocation run tellraw @s {"text": "你从未死亡!"}
|
||||
@@ -0,0 +1,7 @@
|
||||
data remove storage fzsd:last_death fzsd
|
||||
|
||||
## 标记为已卸载
|
||||
data modify storage fzsd:installed fzsd.module.last_death 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