diff --git a/mods/capturetheflag/ctf/teams.lua b/mods/capturetheflag/ctf/teams.lua index bc21631..da6a84b 100644 --- a/mods/capturetheflag/ctf/teams.lua +++ b/mods/capturetheflag/ctf/teams.lua @@ -361,9 +361,11 @@ minetest.register_on_respawnplayer(function(player) if ctf.team(team) then local spawn = ctf.get_spawn(team) - player:moveto(spawn, false) - return true - else - return false + if spawn then + player:moveto(spawn, false) + return true + end end + + return false end)