Items deleted from an enderchest row when locked again
utarwyn opened this issue · 0 comments
Versions
EnderContainers version: 2.2.0
Platform version: all versions
Describe the bug
To unlock new rows of an enderchest, a permission can be applied to a player. Then it can uses these rows to store personal items. But if the user looses this permission, all items that are out of bounds (in locked rows) are removed when the container is saved. If the player regains access to its locked rows, there will be empty.
There was not this problem in version 2.1.0 of the plugin.
Expected behavior
This bug is because I have changed the container management system to attach enderchest items directly to its container, so if the container is smaller, items that are out of bounds are automatically removed. I thought it was interesting to do this to improve the plugin performance, but I didn't think this change would cause this problem.
To solve the issue, I should separate items of enderchests from containers. (maybe by storing them in an internal map as before)
A large thank to ludgart for the feedback.