Update vault size each time inventory is opened.

Before, the VaultViewInfo was being stored as name instead of uuid as well as not being removed when a vault was closed. This caused the same inventory to be accessed from memory each time the vault was opened after the first opening since the last restart when it would load from file. Since we are recreating the inventory each time, there will likely be a performance loss but we will update the vault title and size each time its opened. Resolves #58.
This commit is contained in:
drtshock
2015-04-27 14:02:51 -05:00
parent 8375d71e3e
commit ede738019a
8 changed files with 59 additions and 292 deletions
@@ -91,7 +91,7 @@ public class VaultOperations {
* @return max size as integer. If no max size is set then it will default to 54.
*/
public static int getMaxVaultSize(OfflinePlayer player) {
if (player == null) {
if (player == null || !player.hasPlayedBefore()) {
return 54;
}
for (int i = 6; i != 0; i--) {