API Events

This page is dedicated to explain how LastLoginAPI events works.

You can handle a LastLoginAPI event like Bukkit ones:

@EventHandler
public void onPlayerChat(BukkitLastLoginUpdateLoginTimestampEvent event) {
    if (event.getPlayer().getName().equals("AlessioDP"))
        event.setCancelled(true);
}

Both Bukkit and Bungee events supported

Due to different event interface between Bungeecord and Bukkit, we must choose which event to handle.

To do that you just need to append Bukkit or Bungee before the event class name, like "BukkitLastLoginUpdateNameEvent" or "BungeeLastLoginUpdateNameEvent".

List of events

Some events are cancellable or editable (editable means that you can edit the values of the event).

This is a list of the supported events:

Event Cancellable Editable Async Server
LastLoginUpdateNameEvent ✖ No ✖ No ✔ Yes All
LastLoginUpdateLoginTimestampEvent ✔ Yes ✔ Yes ✖ No All
LastLoginUpdateLogoutTimestampEvent ✔ Yes ✔ Yes ✖ No All