From 7437d3945be215ee27c6724b6a9fe707d4158483 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 5 Feb 2019 00:07:39 +0100 Subject: [PATCH] Forget spawn if bed was destroyed --- mods/PLAYER/mcl_spawn/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/PLAYER/mcl_spawn/init.lua b/mods/PLAYER/mcl_spawn/init.lua index 65853028d2..0413219b4e 100644 --- a/mods/PLAYER/mcl_spawn/init.lua +++ b/mods/PLAYER/mcl_spawn/init.lua @@ -48,6 +48,10 @@ minetest.register_on_respawnplayer(function(player) player:set_pos(pos) return true else + -- Forget spawn if bed was missing + if (bgroup ~= 1 and bgroup ~= 2) then + mcl_spawn.set_spawn_pos(player, nil) + end minetest.chat_send_player(player:get_player_name(), "Your spawn bed was missing or blocked.") end end