From 1a4166560c9bcd2369c0a8b0c268c04937b3b65c Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 20 Jul 2021 17:52:03 -0700 Subject: [PATCH] Update for simple_protection API from Git commit 3f34eda... https://github.com/SmallJoker/simple_protection/tree/3f34eda --- tnt_function.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tnt_function.lua b/tnt_function.lua index 11ef340..be6b244 100644 --- a/tnt_function.lua +++ b/tnt_function.lua @@ -165,7 +165,7 @@ local function add_drop(drops, item) end local function is_protected(pos, name) return core.is_protected(pos, name) end -if core.global_exists("s_protect") then +if core.global_exists("simple_protection") and simple_protection.can_access then is_protected = function(pos, name) local s_protect_name = name -- simple_protection ignores names with empty strings @@ -173,7 +173,7 @@ if core.global_exists("s_protect") then s_protect_name = " " end - return core.is_protected(pos, name) or not s_protect.can_access(pos, s_protect_name) + return core.is_protected(pos, name) or not simple_protection.can_access(pos, s_protect_name) end end