Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Icommon Api Wiki › Guides › Create a Custom YAML Configuration File

Create a Custom YAML Configuration File

Setting Up Your Config

The iCommon API Mod provides a simple YAML Configuration API that lets you store and manage settings without writing complex code. This is useful for mods built on top of iCommon that need to save player preferences, world settings, or feature toggles.

Steps

1. Navigate to your mod's config folder (typically config/ in your game directory)

2. Create a new .yml file with a descriptive name (e.g., mymod-settings.yml)

3. Write your configuration in standard YAML format:

`

feature:

enabled: true

value: 100

`

4. Save the file

5. The mod using iCommon API will automatically read and parse this file on startup

Tips

  • Use proper YAML indentation (spaces, not tabs)
  • Nested values use colons and indentation
  • Comments start with #
  • The API handles reloading configs without restarting in many cases

Check your specific mod's documentation for which config keys it recognizes and what values they accept.