Null check

This commit is contained in:
Trent Hensler
2018-01-01 00:24:42 -08:00
parent c1ff332565
commit e8843bc054
2 changed files with 4 additions and 2 deletions
@@ -142,8 +142,10 @@ public class VaultManager {
// In this case, players will lose items. // In this case, players will lose items.
if (deserialized.getContents().length > size) { if (deserialized.getContents().length > size) {
for (ItemStack stack : deserialized.getContents()) { for (ItemStack stack : deserialized.getContents()) {
if (stack != null) {
inventory.addItem(stack); inventory.addItem(stack);
} }
}
} else { } else {
inventory.setContents(deserialized.getContents()); inventory.setContents(deserialized.getContents());
} }
+1 -1
View File
@@ -29,7 +29,7 @@ economy:
# Use material names. This does not work with ids. # Use material names. This does not work with ids.
# Should we even use this? If left to false, the list won't do anything. # Should we even use this? If left to false, the list won't do anything.
blockitems: false blockitems: true
# Only effective if the above option is true. # Only effective if the above option is true.
blocked-items: blocked-items: