1
0
Fork 0

Add proper error msg when using kill w/o dmg

objects
Wuzzy 2017-12-13 19:42:30 +01:00
parent 55c714ec48
commit b0c8c64bbe
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ local function handle_clear_command(giver, receiver)
end
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)
if victimref == nil then
return false, S("Player @1 does not exist.", victim)