forked from MineClone5/MineClone5
Add proper error msg when using kill w/o dmg
This commit is contained in:
parent
55c714ec48
commit
b0c8c64bbe
|
@ -34,6 +34,9 @@ local function handle_clear_command(giver, receiver)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handle_kill_command(suspect, victim)
|
local function handle_kill_command(suspect, victim)
|
||||||
|
if not minetest.settings:get_bool("damage_enabled") then
|
||||||
|
return false, S("Players can't be killed right now, damage has been disabled.")
|
||||||
|
end
|
||||||
local victimref = minetest.get_player_by_name(victim)
|
local victimref = minetest.get_player_by_name(victim)
|
||||||
if victimref == nil then
|
if victimref == nil then
|
||||||
return false, S("Player @1 does not exist.", victim)
|
return false, S("Player @1 does not exist.", victim)
|
||||||
|
|
Loading…
Reference in New Issue