nkosmos / starboard

A small but expandable Java setting library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

starboard

A small but expandable java setting library.

How to import

Gradle

repositories {
    maven {
        url 'https://jitpack.io/'
    }
}

dependencies {
    implementation('com.github.nkosmos:starboard:VERSION')
}

Maven

no.

Getting started

Declarations

Groups

Groups are a way of... well grouping setting together. They can be declared as such:

public class MyClass {

    private final Group defaultGroup = new Group("Default Group", this);

}

Groups can also have parent/child groups:

public class MyOtherClass {

    private final Group parentGroup = new Group("Root Group", this);
    private final Group childGroup = new Group("Subgroup", this, parentGroup);

}

Setting declaration

Settings can be declared under groups, and capture their value type as such:

public class AnotherClass {

    private final Group defaultGroup = new Group("Default Group", this);

    private final Setting<String> nameSetting = new Setting<>(defaultGroup, "Name", "Tommy");
    private final Setting<Integer> ageSetting = new Setting<>(defaultGroup, "Age", 18);

}

Constraints

Value constraints

TODO

Visibility constraints

TODO

Credits

This project was based on the LeafClient/Konfigurate kotlin library by Shyrogan. Thanks to him for letting us use their structure and parts of their code!

License

This project is provided free-of-charge under the MIT License.

About

A small but expandable Java setting library.

License:MIT License


Languages

Language:Java 100.0%