If you want to read a boolean value from your configuration file, you should use getBoolean
method (true
in getBoolean(true)
indicates the default value):
CreativeBiomeConfig = config.get(Configuration.CATEGORY_GENERAL, "CreativeBiomeConfig", true).getBoolean(true);
You should also make sure that the CreativeBiomeConfig
field in your class is declared as boolean:
public static boolean CreativeBiomeConfig;
Of course, you can change the name of the setting (second argument of config.get
) if you want to, you don't have to rename variables in your code:
CreativeBiomeConfig = config.get(Configuration.CATEGORY_GENERAL, "SpawnCreativeBiome", true).getBoolean(true);