1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Require 'give' priv for /pulverize and /clearinv

This commit is contained in:
Wuzzy 2025-09-28 18:15:24 +02:00
parent 421835a30e
commit 3ca50d78f3
2 changed files with 3 additions and 1 deletions

View file

@ -902,6 +902,7 @@ core.register_chatcommand("spawnentity", {
core.register_chatcommand("pulverize", { core.register_chatcommand("pulverize", {
params = "", params = "",
description = S("Destroy item in hand"), description = S("Destroy item in hand"),
privs = {give=true},
func = function(name, param) func = function(name, param)
local player = core.get_player_by_name(name) local player = core.get_player_by_name(name)
if not player then if not player then
@ -1302,6 +1303,7 @@ core.register_chatcommand("last-login", {
core.register_chatcommand("clearinv", { core.register_chatcommand("clearinv", {
params = S("[<name>]"), params = S("[<name>]"),
description = S("Clear the inventory of yourself or another player"), description = S("Clear the inventory of yourself or another player"),
privs = {give=true},
func = function(name, param) func = function(name, param)
local player local player
if param and param ~= "" and param ~= name then if param and param ~= "" and param ~= name then

View file

@ -71,7 +71,7 @@ core.register_privilege("kick", {
give_to_admin = true, give_to_admin = true,
}) })
core.register_privilege("give", { core.register_privilege("give", {
description = S("Can use /give and /giveme"), description = S("Can use /give, /giveme, /pulverize and /clearinv"),
give_to_singleplayer = false, give_to_singleplayer = false,
}) })
core.register_privilege("password", { core.register_privilege("password", {