Search in sources :

Example 1 with Configuration

use of your.name.plugin.config.Configuration in project PaperPluginTemplate by oskarscot.

the class Plugin method loadConfig.

private void loadConfig() {
    Configuration configuration = ConfigManager.create(Configuration.class, it -> it.withConfigurer(new JsonGsonConfigurer(), new SerdesBukkit()).withBindFile(new File(this.getDataFolder(), "config.json")).saveDefaults().load(true));
    this.injector.registerInjectable(configuration);
}
Also used : JsonGsonConfigurer(eu.okaeri.configs.json.gson.JsonGsonConfigurer) Configuration(your.name.plugin.config.Configuration) SerdesBukkit(eu.okaeri.configs.yaml.bukkit.serdes.SerdesBukkit) File(java.io.File)

Aggregations

JsonGsonConfigurer (eu.okaeri.configs.json.gson.JsonGsonConfigurer)1 SerdesBukkit (eu.okaeri.configs.yaml.bukkit.serdes.SerdesBukkit)1 File (java.io.File)1 Configuration (your.name.plugin.config.Configuration)1