Basic API Information - kyngs/LibreLogin GitHub Wiki
LibreLogin offers a vast API, which allows you to fit LibreLogin exactly to your needs. If you are clueless about what something does, fill up an issue, and I will try to answer it ASAP.
maven("https://repo.kyngs.xyz/public")
maven {
url "https://repo.kyngs.xyz/public"
}
<repository>
<id>kyngs-repo-public</id>
<name>Repository</name>
<url>https://repo.kyngs.xyz/public</url>
</repository>
Substitute <version> for the version you want to depend on. You can browse available releases here, or you can browse available snapshots (dev builds) here.
compileOnly("xyz.kyngs.librelogin:API:<version>")
compileOnly "xyz.kyngs.librelogin:API:<version>"
<dependency>
<groupId>xyz.kyngs.librelogin</groupId>
<artifactId>API</artifactId>
<version><version></version>
<scope>provided</scope>
</dependency>
You must declare "LibreLogin" as a dependency in your plugin.yml. Then you can get the API instance:
var api = ((LibreLoginProvider<Player, World>) Bukkit.getPluginManager().getPlugin("LibreLogin")).getLibreLogin();
You must declare "librelogin" as a dependency in your plugin annotation. Then you can get the API instance:
var api = ((LibreLoginProvider<Player, RegisteredServer>) server.getPluginManager().getPlugin("librelogin").orElseThrow().getInstance().orElseThrow()).getLibreLogin();
You must declare "LibreLogin" as a dependency in your plugin.yml/bungee.yml. Then you can get the API instance:
var api = ((LibreLoginProvider<ProxiedPlayer, ServerInfo>) getProxy().getPluginManager().getPlugin("librelogin")).getLibreLogin();
You must get the LibreLogin plugin instance from your platform's plugin manager. Then you need to cast it into LibreLoginProvider<?, ?>
All methods in the API are documented. Sources should be downloaded by your IDE, so you can just look into it. For events, see API Events
If there is a feature that is contained in the implementation, but not in the API, please open up an issue and we will solve it