local modname = minetest.get_current_modname() local modpath = minetest.get_modpath(modname) yl_tools = {} function yl_tools.can_interact(pos, player) if player and player:is_player() then if minetest.check_player_privs(player, "protection_bypass") then return true end else return false end local player_name = player:get_player_name() local meta = minetest.get_meta(pos) local owner = meta:get_string("owner") if not owner or owner == "" or owner == player_name then return true end if not minetest.is_protected(pos, player_name) then return true end return false end dofile(modpath.."/chest.lua")