Explorar o código

计数排除旁观者

00ll00 %!s(int64=6) %!d(string=hai) anos
pai
achega
49db9ada11

+ 1 - 1
data/mini/functions/main/player_failed.mcfunction

@@ -2,7 +2,7 @@
 
 
 # 计数
 # 计数
 tag @s remove mini_running
 tag @s remove mini_running
-execute store result score $t_alive mem if entity @a[tag=mini_running]
+execute store result score $t_alive mem if entity @a[tag=mini_running,tag=!hub_watch]
 execute if score $t_alive mem matches 1.. run tellraw @a [{"selector": "@s","color":"red"}," 已失败! 剩余 ",{"score": {"name": "$t_alive","objective": "mem"}}," 人!"]
 execute if score $t_alive mem matches 1.. run tellraw @a [{"selector": "@s","color":"red"}," 已失败! 剩余 ",{"score": {"name": "$t_alive","objective": "mem"}}," 人!"]
 
 
 # 给存活的玩减分
 # 给存活的玩减分

+ 1 - 1
data/mini/functions/main/player_finished.mcfunction

@@ -2,7 +2,7 @@
 
 
 # 计数
 # 计数
 tag @s remove mini_running
 tag @s remove mini_running
-execute store result score $t_finish mem if entity @a[tag=!mini_running]
+execute store result score $t_finish mem if entity @a[tag=!mini_running,tag=!hub_watch]
 execute if score $t_finish mem matches ..3 run tellraw @a [{"selector": "@s","color":"green"}," 已成功! 第 ",{"score": {"name": "$t_finish","objective": "mem"}}," 名!"]
 execute if score $t_finish mem matches ..3 run tellraw @a [{"selector": "@s","color":"green"}," 已成功! 第 ",{"score": {"name": "$t_finish","objective": "mem"}}," 名!"]
 
 
 # 给已完成的玩家加分
 # 给已完成的玩家加分