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:
Vitaliy 2020-08-15 15:33:11 +03:00 odevzdal GitHub
rodič 16836b16d6
revize 4750925eab
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 2 přidání a 1 odebrání

Zobrazit soubor

@ -174,7 +174,8 @@ 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", {