fireEvent

fun <T : Event> fireEvent(event: T): T

Utility function to fire an event.

This function calls the Bukkit.getPluginManager().callEvent method to trigger the specified event and notify any listeners that are registered for that event.

Return

The same event object that was passed as an argument, allowing for method chaining if needed.

Parameters

event

The event to fire.