diff --git a/api.lua b/api.lua index 14ec695..da7407b 100644 --- a/api.lua +++ b/api.lua @@ -168,7 +168,7 @@ function pvp_block.drop_inventory(pos, player) player_inv:set_list("main", {}) player_inv:set_list("craft", {}) end - -- hitter:setpos( {x=50, y=15.5, z=117} ) + -- hitter:set_pos( {x=50, y=15.5, z=117} ) -- minetest.chat_send_all("Player "..name.." sent to jail for killing " .. pname .." without reason in town") -- minetest.log("action", "Player "..name.." warned for killing in town") @@ -183,7 +183,7 @@ function pvp_block.register_on_punchplayer(player, hitter, time_from_last_punch, end local hp = player:get_hp() - local pos = player:getpos() + local pos = player:get_pos() -- local nametag_attr = player:get_nametag_attributes() -- print("in_area: ", dump(pvp_block:in_area(pos))) -- print("hp: ", hp) @@ -213,7 +213,7 @@ minetest.register_on_dieplayer(function(player) end local hp = player:get_hp() - local pos = player:getpos() + local pos = player:get_pos() if pvp_block:in_area(pos) then pvp_block.drop_inventory(pos, player)