default - commands - killme - fix mistake is_player conditional
This commit is contained in:
parent
260ff7143a
commit
cd7c4e5949
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user