1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-06-29 23:00:55 +02:00

More armor callback fixes

This commit is contained in:
stujones11
2018-05-24 18:56:20 +01:00
parent a5ddc3e60a
commit 1f11a28ad4
2 changed files with 14 additions and 13 deletions

View File

@ -268,10 +268,10 @@ if armor.config.drop == true or armor.config.destroy == true then
local stack = armor_inv:get_stack("armor", i)
if stack:get_count() > 0 then
table.insert(drop, stack)
armor:set_inventory_stack(player, i, nil)
armor:run_callbacks("on_unequip", player, i, stack)
armor_inv:set_stack("armor", i, nil)
end
end
armor:save_armor_inventory(player)
armor:set_player_armor(player)
local pos = player:getpos()
if pos and armor.config.destroy == false then