From cd7c4e5949cfcbad4bbf856c276200c6b4a66d31 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 8 Jun 2023 00:13:42 -0400 Subject: [PATCH] default - commands - killme - fix mistake is_player conditional --- mods/default/commands.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/default/commands.lua b/mods/default/commands.lua index 64f81e0..d7a6760 100644 --- a/mods/default/commands.lua +++ b/mods/default/commands.lua @@ -12,16 +12,16 @@ ---------------------------------------------------------------------------- local killme_mod = minetest.get_modpath("killme") -local killme_mod = minetest.get_modpath("game_commands") +local command_mod = minetest.get_modpath("game_commands") -if not killme_mod then +if not killme_mod or not command_mod then minetest.register_chatcommand("killme", { description = "Kill yourself to respawn", func = function(name) local player = minetest.get_player_by_name(name) if player then - if minetest.settings:get_bool("enable_damage") and player:is_player then + if minetest.settings:get_bool("enable_damage") and player:is_player() then player:set_hp(0) return true else