EventListener.callEventIfExists

Calls an event only if it exists. This should be used when a event is used only to notify the plugin of it.

class EventListener(O : Event, Children...)
T
callEventIfExists
(
T : O
)
(
lazy Parameters!(T.__ctor) args
)
if (
is(T == class) &&
!isAbstractClass!T
)
if (
areValidChildren!(O, Children)
)

Return Value

Type: T

the instance of the event or null if the event hasn't been called

Meta