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:
@@ -44,7 +44,9 @@ public class PlayerVaults extends JavaPlugin {
|
||||
private String newVersion = "";
|
||||
private String link = "";
|
||||
private HashMap<String, SignSetInfo> setSign = new HashMap<>();
|
||||
// Player name - VaultViewInfo
|
||||
private HashMap<String, VaultViewInfo> inVault = new HashMap<>();
|
||||
// VaultViewInfo - Inventory
|
||||
private HashMap<String, Inventory> openInventories = new HashMap<>();
|
||||
private Economy economy = null;
|
||||
private boolean dropOnDeath = false;
|
||||
|
||||
Reference in New Issue
Block a user