Skip to content

Configuration

Configuration in CustomCrafting is done using HOCON files with the .conf file suffix.

WARNING

CustomCrafting v5 is still in alpha! Properties and the structure of configuration files may change at any point without backwards compatibility until CustomCrafting is stable.

Guides to update configs will be added to this wiki whenever a breaking change occurs. However, it will involve manually editing the configs on your end!

What is HOCON?

HOCON (Human-Optimized Config Object Notation) is a human-friendly configuration format.
It is a superset of JSON, meaning any valid JSON is also valid HOCON, but provides additional features such as:

  • Comments: Use // or # to add comments.
  • Omitting Quotes: Keys and string values often don't require quotes.
  • Omitting root braces: No need for {} around the root object
  • Omitting commas: in many places newlines can be used instead
  • Allow trailing commas after the last elements in objects and arrays

These are only a few features that make editing configs a lot easier, convenient, and less prone to errors, compared to the strict JSON syntax. If JSON is still the preferred choice, it can be used as it is fully compatible with HOCON.

For more detailed information and syntax guides, visit the official HOCON website.

HOCON include statement

CustomCrafting does not support the HOCON include statement! While that is more of a technical limitation at this time, it also is a valid security concern, so implementing it in the future is not a priority and would require thorough research if ever reconsidered.

Configuration Structure

  • <cc_root> - The root dir. Actual location depends on the platform.
    Spigot/Paper: plugins/customcrafting
    Fabric: config/customcrafting

    • .data - Data that is cached and used internally by CC

    • config - Customisable configuration files

      • resources - Configuration files for resources
    • resources - Default location for resources

      • defaults - Includes the default recipes shipped with CC

      • */** - Any custom directories from which to load resources.
        (relative source paths; see sources)

        • recipes - A resource type directory containing recipe config files
        • ingredients - A resource type directory containing ingredient config files