完善所有剩余功能,后续bug修复后即准备发布正式版并向下移植

- 将命名空间改为“fzsd”
- 完善交互器
- 添加管理员命令(/function admin.fzsd:<...>)
- 添加启动函数,用于自动升级等功能
- 添加重装、深度安装、深度卸载、深度重装函数
This commit is contained in:
延皓
2022-07-30 16:34:38 +08:00
parent dfe06e506c
commit da7af9fc83
994 changed files with 3644 additions and 3522 deletions
@@ -0,0 +1,5 @@
execute if predicate fzsd:in_dimension_overworld run scoreboard players set @s fzsd.module.last_nether_portal.dimension 0
execute if predicate fzsd:in_dimension_the_nether run scoreboard players set @s fzsd.module.last_nether_portal.dimension -1
execute store result score @s fzsd.module.last_nether_portal.x run data get entity @s Pos[0]
execute store result score @s fzsd.module.last_nether_portal.y run data get entity @s Pos[1]
execute store result score @s fzsd.module.last_nether_portal.z run data get entity @s Pos[2]
@@ -0,0 +1,5 @@
execute if score @s fzsd.module.last_nether_portal.dimension matches 0 run data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld"
execute if score @s fzsd.module.last_nether_portal.dimension matches -1 run data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:the_nether"
##
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,2 @@
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @a [{"selector": "@s"}, [{"text": "说:我上次穿出的下界传送门位于", "color": "white"}, {"nbt": "fzsd.message", "interpret": true, "storage": "fzsd:last_nether_portal"}]]
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
@@ -0,0 +1,11 @@
scoreboard objectives add fzsd.module.last_nether_portal.dimension dummy
scoreboard objectives add fzsd.module.last_nether_portal.x dummy
scoreboard objectives add fzsd.module.last_nether_portal.y dummy
scoreboard objectives add fzsd.module.last_nether_portal.z dummy
data modify storage fzsd:last_nether_portal fzsd.message set value '[{"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": "[", "color": "green"}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.x"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": ", "}, {"score": {"name": "@s", "objective": "fzsd.module.last_nether_portal.z"}}, {"text": "]"}]]'
##
data modify storage fzsd:installed fzsd.module.last_nether_portal 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_nether_portal: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 -2200"}},{"text": "私信", "color": "aqua"},{"text": "]"}], [{"text": "[", "color": "dark_gray", "hoverEvent": {"action": "show_text", "value": "发送给:所有人"}, "clickEvent": {"action": "run_command", "value": "/trigger fzsd.module.interactor.trigger set -2210"}},{"text": "广播", "color": "aqua"},{"text": "]"}]]
@@ -0,0 +1,2 @@
execute if score @s fzsd.module.interactor.trigger matches -2200 run function #fzsd:module/last_nether_portal/private_message
execute if score @s fzsd.module.interactor.trigger matches -2210 run function #fzsd:module/last_nether_portal/global_message
@@ -0,0 +1,2 @@
execute if score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s [{"text": "你上次穿出的下界传送门位于"}, {"nbt": "fzsd.message", "interpret": true, "storage": "fzsd:last_nether_portal"}]
execute unless score @s fzsd.module.last_nether_portal.dimension matches -2147483648..2147483647 run tellraw @s {"text": "你从未穿出过下界传送门!"}
@@ -0,0 +1,11 @@
scoreboard objectives remove fzsd.module.last_nether_portal.dimension
scoreboard objectives remove fzsd.module.last_nether_portal.x
scoreboard objectives remove fzsd.module.last_nether_portal.y
scoreboard objectives remove fzsd.module.last_nether_portal.z
data remove storage fzsd:last_nether_portal fzsd
##
data modify storage fzsd:installed fzsd.module.last_nether_portal 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": "已卸载组件:上次穿出的下界传送门"}]