-
Notifications
You must be signed in to change notification settings - Fork 97
API Events
kyngs edited this page Jun 11, 2023
·
5 revisions
All event handling is done via EventProvider which can be obtained from LibrePremiumPlugin.
The subscribe method requires you to specify the type you can obtain from the class EventTypes and the action. Example:
var eventTypes = eventProvider.getTypes()
eventProvider.subscribe(eventTypes.passwordChange, event -> {
var old = event.getOldPassword();
var newPassword = event.getUser().getHashedPassword();
// Do some stuff
});All events are documented, check the events package for further details.