Browse Source

Allow admins digging any command block (#525)

Allow admins (i.e. players with the `protection_bypass` privilege) digging any command block
pull/478/merge
Vitaliy 1 month ago
committed by GitHub
parent
commit
4750925eab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mesecons_commandblock/init.lua

+ 2
- 1
mesecons_commandblock/init.lua View File

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


Loading…
Cancel
Save