respawn_patch/init.lua

9 lines
308 B
Lua
Raw Normal View History

2024-10-24 10:29:02 +03:00
minetest.register_on_respawnplayer(function(player)
if player:get_hp() == 0 then
local name = player:get_player_name()
player:set_hp(20)
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
minetest.chat_send_all(dump(player:get_hp()))
end
end)