Allow admins (with protection_bypass privilege) digging any command block

This commit is contained in:
numzero 2020-08-07 23:32:21 +03:00
parent c1eccba247
commit 74f2d2a8a5

View File

@ -174,7 +174,7 @@ end
local function can_dig(pos, player)
local meta = minetest.get_meta(pos)
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
minetest.register_node("mesecons_commandblock:commandblock_off", {