respawn_patch/init.lua
Vitaliy Olkhin 76fa8ccef3 update
2024-10-30 11:39:02 +05:00

10 lines
345 B
Lua

minetest.register_on_respawnplayer(function(player)
local name = player:get_player_name()
minetest.log("action", "respawn_patch: " .. name .. ", get_hp(): " .. player:get_hp())
if player:get_hp() < 1 then
player:set_hp(20)
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
end
end)