diff --git a/README.md b/README.md index fee1f92..8efe8f4 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ ### 管理员 - 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块 +- 开启权限限制后,权限tag为`` ### 其他 diff --git a/data/fzsd/function/game_event/advancement/on_entered_nether_portal.mcfunction b/data/fzsd/function/game_event/advancement/on_entered_nether_portal.mcfunction index b17436f..ede923e 100644 --- a/data/fzsd/function/game_event/advancement/on_entered_nether_portal.mcfunction +++ b/data/fzsd/function/game_event/advancement/on_entered_nether_portal.mcfunction @@ -1,5 +1,5 @@ ## 调试 -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": "进入了下届传送门"}] +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": "进入了下界传送门"}] function #fzsd:game_event/player/on_entered_nether_portal diff --git a/data/fzsd/function/module/last_spawn_point/get_spawn_point.mcfunction b/data/fzsd/function/module/last_spawn_point/get_spawn_point.mcfunction index fb40465..db1b7d3 100644 --- a/data/fzsd/function/module/last_spawn_point/get_spawn_point.mcfunction +++ b/data/fzsd/function/module/last_spawn_point/get_spawn_point.mcfunction @@ -1,7 +1,8 @@ -data modify storage fzsd:global fzsd.api.dimension.id set from entity @s SpawnDimension -data modify storage fzsd:last_spawn_point fzsd.x set from entity @s SpawnX -data modify storage fzsd:last_spawn_point fzsd.y set from entity @s SpawnY -data modify storage fzsd:last_spawn_point fzsd.z set from entity @s SpawnZ +execute if data entity @s respawn.dimension run data modify storage fzsd:global fzsd.api.dimension.id set from entity @s respawn.dimension +execute unless data entity @s respawn.dimension run data modify storage fzsd:global fzsd.api.dimension.id set value "minecraft:overworld" +data modify storage fzsd:last_spawn_point fzsd.x set from entity @s respawn.pos[0] +data modify storage fzsd:last_spawn_point fzsd.y set from entity @s respawn.pos[1] +data modify storage fzsd:last_spawn_point fzsd.z set from entity @s respawn.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": "获取了出生点"}] \ No newline at end of file diff --git a/data/fzsd/function/module/last_spawn_point/private_message.mcfunction b/data/fzsd/function/module/last_spawn_point/private_message.mcfunction index 2fda5c4..baca756 100644 --- a/data/fzsd/function/module/last_spawn_point/private_message.mcfunction +++ b/data/fzsd/function/module/last_spawn_point/private_message.mcfunction @@ -1,2 +1,2 @@ -execute if data entity @s SpawnDimension run tellraw @s [{"text": "你的上个出生点位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_spawn_point"}, {"text": "]"}]] -execute unless data entity @s SpawnDimension run tellraw @s {"text": "你从未设置过出生点!"} \ No newline at end of file +execute if data entity @s respawn run tellraw @s [{"text": "你的上个出生点位于"}, {"nbt": "fzsd.api.dimension.name", "interpret": true, "storage": "fzsd:global"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:last_spawn_point"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:last_spawn_point"}, {"text": "]"}]] +execute unless data entity @s respawn run tellraw @s {"text": "你从未设置过出生点!"} \ No newline at end of file