1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-27 19:20:39 +01:00

Merge pull request #62 from paly2/kill_chatcommand_privs

Add "ban" privilege for kill chatcommand
This commit is contained in:
stujones11 2016-11-27 16:50:03 +00:00 committed by GitHub
commit 9105e8403e

View File

@ -626,10 +626,11 @@ end)
minetest.register_chatcommand("kill", { minetest.register_chatcommand("kill", {
params = "<name>", params = "<name>",
description = "Kills player instantly", description = "Kills player instantly",
privs = {ban=true},
func = function(name, param) func = function(name, param)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(param)
if player then if player then
player:set_hp(-1001) player:set_hp(0)
end end
end, end,
}) })