package amerifrance.guideapi;

import net.minecraftforge.common.config.Configuration;

import java.io.File;

public class ConfigHandler {

    public static Configuration config;

    // Categories
    public static String general = "General";

    // Settings
    public static boolean enableLogging;
    public static boolean canSpawnWithBooks;

    public static void init(File file) {
        config = new Configuration(file);
        syncConfig();
    }

    public static void syncConfig() {
        enableLogging = config.get(general, "enableLogging", true).getBoolean();
        canSpawnWithBooks = config.get(general, "canSpawnWithBooks", true).getBoolean();

        config.save();
    }
}

@@ -177,73 +177,8 @@
 g;%0A%0A
-    // Categories%0A    public static String general = %22General%22;%0A%0A
     
@@ -189,16 +189,16 @@
 ettings%0A
+
     publ
@@ -422,24 +422,81 @@
 cConfig() %7B%0A
+        String category;%0A%0A        category = %22features%22;%0A
         enab
@@ -517,26 +517,24 @@
 nfig.get
-(general, 
+Boolean(
 %22enableL
@@ -542,33 +542,89 @@
 gging%22, 
-true).getBoolean(
+category, true, %22Enables extra information being printed to the console.%22
 );%0A     
@@ -660,18 +660,16 @@
 .get
-(general, 
+Boolean(
 %22can
@@ -689,25 +689,132 @@
 s%22, 
-true).getBoolean(
+category, true, %22Allows books to spawn with new players.%5CnOnly affects books where the author enables the spawning feature.%22
 );%0A%0A

Clean up ConfigHandler slightly