mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 11:17:30 +01:00
Forget spawn if bed was destroyed
This commit is contained in:
parent
6faac04f0d
commit
7437d3945b
@ -48,6 +48,10 @@ minetest.register_on_respawnplayer(function(player)
|
|||||||
player:set_pos(pos)
|
player:set_pos(pos)
|
||||||
return true
|
return true
|
||||||
else
|
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.")
|
minetest.chat_send_player(player:get_player_name(), "Your spawn bed was missing or blocked.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user