1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-03 16:40:38 +02:00

move logic to method

This commit is contained in:
Isidor Zeuner
2017-07-01 10:31:46 +02:00
parent 19c9ca179b
commit 443614f704
2 changed files with 19 additions and 6 deletions

View File

@ -4,6 +4,19 @@ if minetest.get_modpath("areas") then
area_protection.areas = areas
end
local area_protection.interaction_restrictions = function(
area_protection,
player_name
)
if area_protection.areas then
if minetest.check_player_privs(name, {areas = true}) then
return false
end
return true
end
return false
end
local area_protection.interaction_allowed = function(
area_protection,
description,