Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Latest commit

 

History

History
85 lines (52 loc) · 1.57 KB

README.MD

File metadata and controls

85 lines (52 loc) · 1.57 KB

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.