Hook into LastLoginAPI

LastLoginAPI offers some API to work with.

Importing LastLoginAPI





repositories {
    maven {
        name = 'alessiodp-repo'
        url = 'https://repo.alessiodp.com/releases/'

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

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 declare 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 JavaDdoc here.