mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-10 01:33:52 +01:00
Spawn mod: Avoid respawn conflict with beds mod (#2240)
This commit is contained in:
parent
b042106fdc
commit
382e2acd9b
@ -1 +1,2 @@
|
|||||||
default
|
default
|
||||||
|
beds?
|
||||||
|
@ -126,7 +126,18 @@ minetest.register_on_newplayer(function(player)
|
|||||||
on_spawn(player)
|
on_spawn(player)
|
||||||
end)
|
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)
|
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)
|
on_spawn(player)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user