diff --git a/shop.lua b/shop.lua index 443af0f..babbc86 100644 --- a/shop.lua +++ b/shop.lua @@ -145,11 +145,12 @@ core.register_node("emeraldbank:shop", { on_metadata_inventory_take = check_empty, can_dig = function(pos, player) - local name = player:get_player_name() + local pname = player:get_player_name() + local is_admin = core.check_player_privs(pname, {server=true}) local meta = core.get_meta(pos) local owner = meta:get_string("owner") local inv = meta:get_inventory() - if inv:is_empty("stock") and name == owner then + if inv:is_empty("stock") and (pname == owner or is_admin) then return true end end