Wiki 9Minecraft Wiki 9Minecraft

Create a Custom YAML Configuration File

Java EditionModGuides 4FAQ 10Related mods 48
DownloadiCommon API Mod

Get the files on 9Minecraft

Contents (3)
  1. Setting Up Your Config
  2. Steps
  3. Tips

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.

More guides for this mod