FancyInnovations

Events

Events API for FancyCore

FancyCore has its own event system that allows you to listen to various events that happen in the FancyCore system.

Registering an event listener

Example for registering a listener for the PlayerReportedEvent:

EventService eventService = FancyCore.get().getEventService();
eventService.registerListener(PlayerReportedEvent.class, (event) -> {
    System.out.println("PlayerReportedEvent fired with report id: " + event.getReport().id());
});

Available events

Player events

EventDescription
PlayerModifiedEventEvent fired when a player's data is modified (through FancyPlayer's setters).
PlayerReportedEventFired when a player is reported.
PlayerPunishedEventFired when a player receives a punishment (warning, kick, mute or ban).

On this page