forked from mtcontrib/3d_armor
Add "ban" privilege for kill chatcommand
This commit is contained in:
parent
ac414d3df3
commit
862deff373
@ -620,10 +620,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(name)
|
||||||
if player then
|
if player then
|
||||||
player:set_hp(-1001)
|
player:set_hp(0)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user