Retain cross-version compatibility & cleanup (#374)

This commit is contained in:
ArtelGG
2018-12-17 22:58:55 -05:00
committed by Trent Hensler
parent df624afedc
commit 88e0351826
25 changed files with 160 additions and 238 deletions
@@ -23,15 +23,23 @@ import java.util.logging.Level;
public class VaultManager {
private static VaultManager instance;
private static final String VAULTKEY = "vault%d";
private static VaultManager instance;
private final File directory = PlayerVaults.getInstance().getVaultData();
private final Map<String, YamlConfiguration> cachedVaultFiles = new ConcurrentHashMap<>();
public VaultManager() {
instance = this;
}
private final File directory = PlayerVaults.getInstance().getVaultData();
private final Map<String, YamlConfiguration> cachedVaultFiles = new ConcurrentHashMap<>();
/**
* Get the instance of this class.
*
* @return - instance of this class.
*/
public static VaultManager getInstance() {
return instance;
}
/**
* Saves the inventory to the specified player and vault number.
@@ -342,13 +350,4 @@ public class VaultManager {
PlayerVaults.getInstance().getLogger().log(Level.SEVERE, "Failed to save vault file for: " + holder, e);
}
}
/**
* Get the instance of this class.
*
* @return - instance of this class.
*/
public static VaultManager getInstance() {
return instance;
}
}