Skip to content

Commit fc0cda8

Browse files
rb: 🩹 fix: 在配置验证失败时添加立即返回
- 在 check_config.mcfunction 中添加 return fail 命令 - 当未找到调用参数时立即终止函数执行 - 避免继续执行后续验证逻辑
1 parent 32e323d commit fc0cda8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ReplaceBlock/data/replace_block/function/api/check_config.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ execute unless data storage replace_block:data settings run \
1010
{"msg":'未找到调用参数',"namespace":"ReplaceBlock"}
1111
execute unless data storage replace_block:data settings run \
1212
scoreboard players set check.fail rb.return 1
13+
execute unless data storage replace_block:data settings run \
14+
return fail
1315

1416
# 验证必需参数是否存在
1517
execute unless data storage replace_block:data settings.selector run \

0 commit comments

Comments
 (0)