1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-27 19:20:39 +01:00

Add killme command to replace old kill command

This commit is contained in:
stujones11 2016-11-27 17:18:08 +00:00
parent 9105e8403e
commit 98786fd8f7

View File

@ -634,3 +634,13 @@ minetest.register_chatcommand("kill", {
end end
end, end,
}) })
minetest.register_chatcommand("killme", {
description = "Kill yourself instantly",
func = function(name)
local player = minetest.get_player_by_name(name)
if player then
player:set_hp(0)
end
end,
})