Skip to content

Structure

Lortseam edited this page Sep 2, 2023 · 13 revisions

Every config consists of entries, containers and groups. You don't necessarily have to create your config entries in just one class, you can use containers and groups to split them up into multiple classes.

Entry

A config entry is a key-value pair. Every entry represents a setting whose value the user can configure.

Container

Containers simply contain entries or other containers.

Group

A group is a container with an identifier.

Config

The config is the root group.

Resolution

While resolving the config, every container will be integrated into its nearest parent group.

Example

- Config
  - Entry A
  - Container
    - Entry B
  - Group
    - Entry C
    - Container
      - Entry D
    - Group
      - Entry E

After resolution:

- Config
  - Entry A
  - Entry B (from container)
  - Group
    - Entry C
    - Entry D (from container)
    - Group
      - Entry E

You can combine as many containers and groups as you need (for example, a container can have multiple child containers as well).


NEXT: Containers and Groups

Clone this wiki locally