mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 01:30:38 +01:00
remove bed.spawn pos when player dig a bed
This commit is contained in:
parent
f9c045edad
commit
7dbac7b8ca
@ -46,6 +46,12 @@ function beds.register_bed(name, def)
|
||||
minetest.remove_node(p)
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
local name = digger:get_player_name()
|
||||
if not name or name == "" then return end
|
||||
beds.spawn[name] = nil
|
||||
beds.save_spawns()
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
beds.on_rightclick(pos, clicker)
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user