The Config Provider simplifies the process of loading, saving, and reloading YAML configuration files. It also adds support for complex Minecraft types natively.

Basic Usage

You can create a config instance using Core.config.get(String).

Config config = Core.config.get("./path/to/config.yml");

ElvenideCore's Config and ConfigSection are fully backwards-compatible with Bukkit's standard Configuration and ConfigurationSection. If you have existing Bukkit config code that you want to migrate to ElvenideCore, all you need to do is replace your YamlConfiguration.load() with our Core.config.get(), and the rest of your existing code should just work.

Accessing Values

The provider handles standard Bukkit types as well as extended types like Material, Sound, and Color.

String message = config.getString("messages.welcome");
Material mat = config.getMaterial("settings.item");