Spawn mod: Avoid respawn conflict with beds mod (#2240)
This commit is contained in:
parent
b042106fdc
commit
382e2acd9b
2 changed files with 12 additions and 0 deletions
|
@ -126,7 +126,18 @@ minetest.register_on_newplayer(function(player)
|
|||
on_spawn(player)
|
||||
end)
|
||||
|
||||
local enable_bed_respawn = minetest.settings:get_bool("enable_bed_respawn")
|
||||
if enable_bed_respawn == nil then
|
||||
enable_bed_respawn = true
|
||||
end
|
||||
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
-- Avoid respawn conflict with beds mod
|
||||
if beds and enable_bed_respawn and
|
||||
beds.spawn[player:get_player_name()] then
|
||||
return
|
||||
end
|
||||
|
||||
on_spawn(player)
|
||||
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue