Skip to content

Commit

Permalink
Test config is being read and loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
OldSerpskiStalker committed Sep 29, 2024
1 parent e0c8e8e commit 212cbd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ public void saveToFile() throws IOException {
}

public void loadFromFile() throws IOException {
Log.writeDataToLogFile(0, "test");
try (FileReader reader = new FileReader(this.nameConfig)) {
JsonElement jsonElement = new JsonParser().parse(reader);
JsonObject jsonObject = jsonElement.getAsJsonObject();

if (jsonObject.has("monitor")) {
JsonObject monitorObject = jsonObject.getAsJsonObject("monitor");
if (jsonObject.has("debug_monitor_cache")) {
JsonObject monitorObject = jsonObject.getAsJsonObject("debug_monitor_cache");
DataCategories.DebugMonitor.instance.setDebugMonitorCache(monitorObject.get("monitorDebug").getAsBoolean());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
*/
public final class RegisterCfgClasses {
private static final Class<?>[] CONFIG_CLASSES = {
//CfgRenderNightConfig.class,
//CfgCacheWorldGame.class,
CfgGameDebugger.class//,
//CfgLogFile.class,
//CfgPlayer.class,
//CfgWindowTitle.class,
//CfgWorldGenerator.class,
//CfgWorldTime.class,
//CfgZombieDropItem.class
CfgGameDebugger.class
};

public RegisterCfgClasses() {
Expand Down

0 comments on commit 212cbd9

Please sign in to comment.