Retain cross-version compatibility & cleanup (#374)
This commit is contained in:
@@ -27,13 +27,21 @@ import java.util.logging.Level;
|
||||
public class UUIDVaultManager {
|
||||
|
||||
private static UUIDVaultManager instance;
|
||||
private final File directory = PlayerVaults.getInstance().getUuidData();
|
||||
private final Map<String, YamlConfiguration> cachedVaultFiles = new ConcurrentHashMap<>();
|
||||
|
||||
public UUIDVaultManager() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private final File directory = PlayerVaults.getInstance().getUuidData();
|
||||
private final Map<String, YamlConfiguration> cachedVaultFiles = new ConcurrentHashMap<>();
|
||||
/**
|
||||
* Get the instance of this class.
|
||||
*
|
||||
* @return - instance of this class.
|
||||
*/
|
||||
public static UUIDVaultManager getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the inventory to the specified player and vault number.
|
||||
@@ -251,9 +259,7 @@ public class UUIDVaultManager {
|
||||
}
|
||||
|
||||
public void removeCachedPlayerVaultFile(String holder) {
|
||||
if (cachedVaultFiles.containsKey(holder)) {
|
||||
cachedVaultFiles.remove(holder);
|
||||
}
|
||||
cachedVaultFiles.remove(holder);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -318,13 +324,4 @@ public class UUIDVaultManager {
|
||||
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 UUIDVaultManager getInstance() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user