mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Init check
This commit is contained in:
parent
2b4e730dcd
commit
8cd33d0770
1 changed files with 7 additions and 0 deletions
|
@ -35,9 +35,15 @@ public class GameConfiguration {
|
|||
private static final Map<String, Object> baseConfig = new HashMap<String, Object>();
|
||||
private static final Map<String, Map<String, Object>> configUpdates = new HashMap<>();
|
||||
private static final Map<String, Map<String, Object>> versionedConfigs = new HashMap<>();
|
||||
private static boolean initialized;
|
||||
private static Yaml yaml;
|
||||
|
||||
public static void init() {
|
||||
if(initialized) {
|
||||
logger.warn("Already initialized!");
|
||||
return;
|
||||
}
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
logger.info("Loading game configuration ...");
|
||||
LoaderOptions options = new LoaderOptions();
|
||||
|
@ -49,6 +55,7 @@ public class GameConfiguration {
|
|||
logger.info("Caching versioned configurations ...");
|
||||
cacheVersionedConfigs();
|
||||
logger.info("Load complete! Took {} milliseconds", System.currentTimeMillis() - startTime);
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
private static void cacheVersionedConfigs() {
|
||||
|
|
Loading…
Add table
Reference in a new issue