Skip to content

FlyUltra/TheBungeeConfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TheBungeeConfig

badge badge badge badge badge badge badge

JavaDoc 1.0

Small and effective Config API for Developers!
Only bungee support!
(Spigot version)

Table of contents

Getting started

Make sure you reloaded maven or gradle in your project.

Add TheBungeeConfig to your project

badge

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.FlyUltra</groupId>
        <artifactId>TheBungeeConfig</artifactId>
        <version>VERSION</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
Gradle
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.FlyUltra:TheBungeeConfig:VERSION'
}

Using Config API

    // 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");
    }

License

TheBungeeConfig is licensed under the permissive MIT license. Please see LICENSE.txt for more information.