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
1 changed files with 10 additions and 0 deletions

View File

@ -634,3 +634,13 @@ minetest.register_chatcommand("kill", {
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,
})