mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-02 07:43:48 +01:00
Add proper error msg when using kill w/o dmg
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
Block a user