Hook into LastLoginAPI

LastLoginAPI offers some API to work with. They are currently under development.

Importing LastLoginAPI





repositories {
    maven {
        name = 'codemc-repo'
        url = 'https://repo.codemc.org/repository/maven-public/'

dependencies {
    compileOnly group: 'com.alessiodp.lastloginapi', name: 'lastloginapi-api', version: '1.3.6'

Implementing LastLoginAPI

Open plugin.yml and insert LastLoginAPI as depend (or soft-depend):

depend: [LastLoginAPI]
soft-depend: [LastLoginAPI]

Before hook into it, be sure its enabled!

if (getServer().getPluginManager().getPlugin("LastLoginAPI") != null) {
    if (getServer().getPluginManager().getPlugin("LastLoginAPI").isEnabled()) {
        // LastLoginAPI is enabled

API Methods

LastLoginAPI offers a class called LastLoginAPI, you can initialize it to call API methods. This is how you can use it:

LastLoginAPI api = LastLogin.getApi();
LLPlayer player = api.getLLPlayer(simplePlayer.getUniqueId()); // Get the player
String name = player.getName(); // Get the name

You can read about events here.


You can find the Javadoc here.