Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Latest commit

 

History

History

bungee

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Usage

import dev.affan.keeper.Keeper;
import dev.affan.keeper.ConfigFile;
import dev.affan.keeper.ConfigValue;

import net.md_5.bungee.api.plugin.Plugin;

/**
 * Every object that contains fields that you want to be load must be annotated.
 */
@ConfigFile("config.yml")
public class TestPlugin extends Plugin {

    /**
     * Every field that you want to load must be annotated.
     */
    @ConfigValue("messages.join")
    private String joinMessage = "Default join message";

    @ConfigValue("messages.quit")
    private String quitMessage = "Default quit message";

    @Override
    public void onEnable() {
        new Keeper(this)
                .register(this) // registering objects that contain ConfigValue fields
                .load();  // loads all the values
    }
}