From 98786fd8f7c12524e33ecffe36b9b750996a19fa Mon Sep 17 00:00:00 2001 From: stujones11 Date: Sun, 27 Nov 2016 17:18:08 +0000 Subject: [PATCH] Add killme command to replace old kill command --- 3d_armor/armor.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 41242e7..abe60b0 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -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, +})