You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
every time i open a player's inventory, their inventory dupes #438
A strange bug has started happening randomly tonight... and i'm not seeing any error in the console or anything, but we're pretty sure it's being caused by OpenInventory. I'll do my best to explain what's happening. So one of my bedrock players noticed it first, items in their inventory were duped after i had peeked at their inventory with /oi, so i took another look with /oi and watched it dupe more and more. Then i checked another bedrock player's inventory and it was happening to them too. We thought it might be a bedrock issue, so i checked that Geyser was up to date, updated it, but still it was happening every time i /oi a player's inventory, i tried a java player's inventory too and theirs was duping too. It was strange, my lower staff could see the inventories duping too if they were watching from /oi, but couldn't ''make it happen'' like i could. Another point worth noting is that I have the ability to modify inventories and they don't. So any time i would /oi a player's inventory, everything would dupe, and the armor slots would flip, boots go to the head, helmet goes to the feet. I pulled a copy of everything from the inventory and then /ci to clear it and still the armor slots stayed filled and kept "flipping" every time i /oi or even if i tried to pick up a piece of armor, another piece was "underneath"/duping right back into the spot and the rest of the armor slots "flipped". Any time i would view a player's inventory through /oi and then pick up/move around items even just within my own inventory, then everything in their inventory would dupe and their armor slots would "flip".
Usually bugs like this are due to bad behavior by sorting plugins. If this only began recently, try removing plugins you've added or upgraded within the past couple days.
The only plugin I had recently updated (besides Geyser) was a plugin called Stackable which does alter inventories so I removed it and the duping issue with OpenInventory went away. Thanks for your help!
If you could link me it I can try and investigate, assuming it's open source. Unfortunately the fix will probably be on their side - OI does do a couple wonky things, but most issues like the content reordering usually are due to assumptions about what slots should hold.
Ok, if it's a problem on their end I can always open an issue with them (or you can, if you wanted, you probably would understand and be able to explain it better!) Thanks so much!
It's a tough situation, because it's partially something OI does, but OI does it to prevent a separate type of bad plugin interaction with roughly the same results. Really no great way about it. I might just remove the "fix" for the other bad plugin interaction if that does end up being the whole problem.
/e: I looked into it a little more. It is the usual issue - get full contents, set individual contents using the slot numbers from the full contents.
The problem the wonky slot numbers is trying to avoid is that there are non-interactable slots in the inventory that will delete items if plugins (usually sorting plugins) insert items into them. To guard against that, OI makes the assumption that if you are fetching the full contents, you will set the full contents after making your edits.
I guess the safest thing to do overall would be to expose the "real" contents list and just throw an exception if a plugin tries to insert items into those slots.
I think the stacking plugin should still add extra handling for upper player inventories, because what a mess that is. Currently it applies the viewer's stack limitations to the viewed player's whole inventory. Is that the right choice? OI also changes shift-clicking behavior to allow shift-clicking armor into the relevant slots. A closed upper player inventory should probably recalculate their slots, at very least.
#439 should resolve the OI side of this. You still might see some issues if, say, you happen to have a lower stack size than someone you open and the plugin attempts to restack their "oversized" stacks into the display-only slots, but that will now cause an error and prevent it from making its modification.
I still have some other plugin compatibility improvements to make so I'm not going to pull it yet, but feel free to grab the build from the CI and let me know how it goes.
Activity
Jikoo commentedon Oct 16, 2026
Usually bugs like this are due to bad behavior by sorting plugins. If this only began recently, try removing plugins you've added or upgraded within the past couple days.
melaniebeedot commentedon Oct 16, 2026
The only plugin I had recently updated (besides Geyser) was a plugin called Stackable which does alter inventories so I removed it and the duping issue with OpenInventory went away. Thanks for your help!
Jikoo commentedon Oct 16, 2026
If you could link me it I can try and investigate, assuming it's open source. Unfortunately the fix will probably be on their side - OI does do a couple wonky things, but most issues like the content reordering usually are due to assumptions about what slots should hold.
melaniebeedot commentedon Oct 16, 2026
Ok, if it's a problem on their end I can always open an issue with them (or you can, if you wanted, you probably would understand and be able to explain it better!) Thanks so much!
https://modrinth.com/plugin/stackable-mn
https://github.com/MidnightTale/Stackable
Jikoo commentedon Oct 17, 2026
It's a tough situation, because it's partially something OI does, but OI does it to prevent a separate type of bad plugin interaction with roughly the same results. Really no great way about it. I might just remove the "fix" for the other bad plugin interaction if that does end up being the whole problem.
/e: I looked into it a little more. It is the usual issue - get full contents, set individual contents using the slot numbers from the full contents.
The problem the wonky slot numbers is trying to avoid is that there are non-interactable slots in the inventory that will delete items if plugins (usually sorting plugins) insert items into them. To guard against that, OI makes the assumption that if you are fetching the full contents, you will set the full contents after making your edits.
I guess the safest thing to do overall would be to expose the "real" contents list and just throw an exception if a plugin tries to insert items into those slots.
I think the stacking plugin should still add extra handling for upper player inventories, because what a mess that is. Currently it applies the viewer's stack limitations to the viewed player's whole inventory. Is that the right choice? OI also changes shift-clicking behavior to allow shift-clicking armor into the relevant slots. A closed upper player inventory should probably recalculate their slots, at very least.
Jikoo commentedon Oct 17, 2026
#439 should resolve the OI side of this. You still might see some issues if, say, you happen to have a lower stack size than someone you open and the plugin attempts to restack their "oversized" stacks into the display-only slots, but that will now cause an error and prevent it from making its modification.
I still have some other plugin compatibility improvements to make so I'm not going to pull it yet, but feel free to grab the build from the CI and let me know how it goes.