From e2e4963437fb78fe53a712eb89037d79307c98d8 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sat, 8 Jan 2022 23:58:57 -0500 Subject: [PATCH] complete fix for famous issue 13, fix mobs damage armor vs hitter * hitter was assumed a player so this complete the commit efb33678f76821270fe287c22c80e2632e050839 * complete fix for Armor still damageable in (pvp) protected area * check https://github.com/minetest-mods/3d_armor/issues/13 on pvp * backported fix Minor improvement to fix #13 --- 3d_armor/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3d_armor/init.lua b/3d_armor/init.lua index 662877cd..09ca62d7 100644 --- a/3d_armor/init.lua +++ b/3d_armor/init.lua @@ -398,7 +398,7 @@ 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() - local tplayer = minetest.get_player_by_name(name) + local tplayer = hitter:is_player() if name and tplayer and minetest.is_protected(player:get_pos(), "") then return elseif name then