diff --git a/init.lua b/init.lua index 90aac0f..af1113b 100644 --- a/init.lua +++ b/init.lua @@ -41,9 +41,10 @@ minetest.register_on_leaveplayer(function(ObjectRef, timed_out) end) minetest.register_on_dieplayer(function(ObjectRef, reason) local name = ObjectRef:get_player_name() - matrix.send(http_api, name .. " has died! Reason:", reason) - if reason.type == "fall" then + if reason.type == nil then + matrix.send(http_api, name .. " died. Reason:", "unknown") + elseif reason.type == "fall" then matrix.send(http_api, name .. " fell from a high place") elseif reason.type == "drown" then matrix.send(http_api, name .. " drowned")