Small and effective Config API for Developers!
Only spigot support!
(Bungee version)
Make sure you reloaded maven or gradle in your project.
You need to add this dependency into your plugin, then look at under the dependencies example
Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ForestTechMC</groupId>
<artifactId>ForestConfigAPI</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
</dependencies>
Gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.ForestTechMC:ForestConfigAPI:VERSION'
}
// Main class
private Main plugin;
// This API
private ConfigAPI configAPI;
// Load method
public void loadConfig() {
// Constructor with Main class, and name
configAPI = new ConfigAPI(plugin, "coolConfig");
// Create config
configAPI.create();
// getConfig() -> this return you configuration of file for using like normal config
configAPI.getConfig().set("coolMessage", "Cool message in config!");
// this save your edits
configAPI.save();
}
// Here you can see, how to get string from your "coolConfig.yml" with path "coolMessage"
public void messages() {
configAPI.getConfig().getString("coolMessage");
}
ForestRedisAPI is licensed under the permissive MIT license. Please see LICENSE.txt
for more information.