4 Hooking into AuthMe
ljacqu edited this page 2017-09-29 20:05:26 +02:00

A technical description for plugin developers on how to interact with AuthMe.

API

We offer an API for performing actions and queries in AuthMe, see AuthMeApi. You can get the AuthMeApi object the following way:

import fr.xephi.authme.api.v3.AuthMeApi;
// ...
AuthMeApi authmeApi = AuthMeApi.getInstance();

The individual methods are described in the Javadoc (see link above).

Events

Before or after various actions, we throw an Event you can listen to in your plugin. All AuthMe events extend the CustomEvent class. You can see a list of all events and their hierarchy here. All event classes are described with Javadoc.

Note that not all events can be canceled—only the ones extending Bukkit's Cancellable interface.

Demo Plugin

A functional plugin demonstrating AuthMe integration is hosted on the ljacqu/AuthMe_demo_integration repository.