1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-06-26 21:40:42 +02:00

Prevent switching pages when using sfinv

Previously, 3d_armor would issue an inventory update
even if the 3d_armor page wasn't shown..
This commit is contained in:
SmallJoker 2025-06-24 21:12:22 +02:00
parent dbc891a711
commit dbe0a9276a

View File

@ -15,7 +15,7 @@ sfinv.register_page("3d_armor:armor", {
end
})
armor:register_on_update(function(player)
if sfinv.enabled then
if sfinv.enabled and sfinv.get_page(player) == "3d_armor:armor" then
sfinv.set_player_inventory_formspec(player)
end
end)