Skip to content
Petrus Pradella edited this page Jun 28, 2026 · 5 revisions

EveryConfig

One config API. Every format. Comments included.

EveryConfig is a Jackson-backed configuration library for the JVM. The canonical state of a config is a Jackson ObjectNode tree; a pluggable Codec turns text ⇄ tree, a format-agnostic comment overlay preserves comments, and typed entity binding is a derived view that merges into the tree rather than replacing it.

  • Group / artifact: br.com.finalcraft:EveryConfig · Version: 1.0.1
  • Root package: br.com.finalcraft.everyconfig
  • Pure Java — no Bukkit/Spigot API, no EverNifeCore.

What can it do?

Need Page
Add the dependency Installation
Read & write config by path The Dynamic API
Seed defaults + document them Default Values & Comments
Pick a format (YAML/JSON/TOML/JSONC) Codecs & Formats
Map config to typed objects Entity Binding
Use @Key / @Comment / @Section / @KeyIndex / @PostLoad Annotations
Store a keyed collection @KeyIndex Collections
Save / reload / watch a file Lifecycle, Reload & Watching
How it fits together Architecture Overview
Quick reference API Cheat Sheet
Surprises to avoid FAQ & Gotchas

Hello, EveryConfig

Config cfg = Config.open(Paths.get("server.yml"), new YamlCodec());

cfg.setValue("server.host", "localhost");
int port = cfg.getOrSetValueIfAbsent("server.port", 25565, "the listen port"); // seeds value + comment if absent

cfg.save(); // atomic write; comments + key order preserved

Switch the codec and the same code writes TOML, JSON or JSONC:

Config cfg = Config.open(Paths.get("server.toml"), new TomlCodec());

No file? Config.inMemory() gives the full typed/POJO API with no back-store (save() throws). Already opened over a file? cfg.save(new JsonCodec()) persists one snapshot in another format without changing the live codec, and cfg.changeCodec(new TomlCodec()) switches the format for every later save.

New here? Start with Installation then Quick Start.

Clone this wiki locally