1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-16 09:55:22 +02:00

Require 'give' priv for /pulverize and /clearinv (#16526)

This commit is contained in:
Wuzzy
2025-10-05 19:01:12 +02:00
committed by GitHub
parent 29476f406b
commit b816542e22
2 changed files with 3 additions and 1 deletions

View File

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