Explorar el Código

玩家离开修复

HerobrineXia hace 6 años
padre
commit
44299e266b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      data/ltw/functions/main/player_changed.mcfunction

+ 2 - 2
data/ltw/functions/main/player_changed.mcfunction

@@ -3,7 +3,7 @@ execute unless score $player_count mem matches -2147483648..2147483647 store res
 # 计算玩家数量
 # 计算玩家数量
 execute store result score $player_count_now mem if entity @a
 execute store result score $player_count_now mem if entity @a
 # 比较玩家数量
 # 比较玩家数量
-execute unless score $player_count_now mem = $player_count mem run function ltw:main/player_leave
+execute if score $player_count_now mem < $player_count mem run function ltw:main/player_leave
 
 
 # 重置玩家数量
 # 重置玩家数量
-execute unless score $player_count_now mem = $player_count mem run scoreboard players operation $player_count mem = $player_count_now mem
+execute if score $player_count_now mem < $player_count mem run scoreboard players operation $player_count mem = $player_count_now mem