Fix reordering issue on non-full vault sizes:

No longer tries to save a 6 row vault unless the vault has 6 rows.
This commit is contained in:
mbax
2021-07-21 13:19:55 -04:00
parent 5077a42f9b
commit d2dc723265
2 changed files with 2 additions and 1 deletions
@@ -172,6 +172,7 @@ public class VaultManager {
// Happens on change of permission or if people used the broken version.
// In this case, players will lose items.
if (deserialized.length > size) {
PlayerVaults.debug("Loaded vault for " + ownerName + " and got " + deserialized.length + " items for allowed size of " + size+". Attempting to rescue!");
for (ItemStack stack : deserialized) {
if (stack != null) {
inventory.addItem(stack);