From d5154803702eaea5979a16d9f1ba205b84d6f5e5 Mon Sep 17 00:00:00 2001 From: Sirrobzeroone <44497598+sirrobzeroone@users.noreply.github.com> Date: Sat, 19 Dec 2020 13:23:17 +1100 Subject: [PATCH] fix for #13 Tested PVP inside and outside protected - passed as expected Tested PvsM inside and outside protected - passed as expected --- 3d_armor/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3d_armor/init.lua b/3d_armor/init.lua index a804e14..18d5a8f 100644 --- a/3d_armor/init.lua +++ b/3d_armor/init.lua @@ -395,7 +395,10 @@ if armor.config.punch_damage == true then minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities) local name = player:get_player_name() - if name then + local name2 = hitter:get_player_name() + if name and name2 and minetest.is_protected(player:get_pos(), "") then + return + elseif name then armor:punch(player, hitter, time_from_last_punch, tool_capabilities) last_punch_time[name] = minetest.get_gametime() end