Developer Guide
Welcome to the YAML Config Developer Guide. This library is designed to abstract the complexities of file I/O, networking, and user interfaces, allowing you to implement robust configuration systems in minutes.
Core Concepts
- The Builder Pattern: You do not create config classes manually. You use the
ConfigBuilderto define your structure programmatically. - Entry Objects: When you define a config option, you get back an
IConfigEntry<T>object. You keep a reference to this object to access the value later. - Automatic Networking: If you use
ConfigType.COMMON, the library handles synchronizing values from the logical server to connected clients automatically. - The Stack: The configuration structure is hierarchical. You use a stack-based approach (
push/pop) to create categories and sub-categories.
Getting Started
- Dependency Setup - Adding the library to your Gradle project.
- The Config Builder - Learning the syntax to create configs.
- Config Types & Networking - Understanding Client vs. Common vs. Server scopes.
- Validation & Comments - Adding constraints and user guidance.
API Reference
- Primitives - Booleans, Integers, Floats, Doubles, Longs.
- Strings - Text validation, Regex, and Enumerated Strings.
- Lists & Maps - Handling collections of data.
- Minecraft Types - ResourceLocations and Registry entries.
- Special Types - Enums, DateTimes, and Custom implementations.