mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-08-20 04:54:11 +02:00
Allow admins digging any command block (#525)
Allow admins (i.e. players with the `protection_bypass` privilege) digging any command block
This commit is contained in:
parent
16836b16d6
commit
4750925eab
@ -174,7 +174,8 @@ end
|
|||||||
local function can_dig(pos, player)
|
local function can_dig(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
return owner == "" or owner == player:get_player_name()
|
return owner == "" or owner == player:get_player_name() or
|
||||||
|
minetest.check_player_privs(player, "protection_bypass")
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("mesecons_commandblock:commandblock_off", {
|
minetest.register_node("mesecons_commandblock:commandblock_off", {
|
||||||
|
Loading…
Reference in New Issue
Block a user