Package net.luckperms.api.event
Interface EventSubscription<T extends LuckPermsEvent>
-
- Type Parameters:
T- the event class
- All Superinterfaces:
AutoCloseable
public interface EventSubscription<T extends LuckPermsEvent> extends AutoCloseable
Represents a subscription to aLuckPermsEvent.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Unregisters this handler from the event bus.@NonNull Class<T>getEventClass()Gets the class this handler is listening to@NonNull Consumer<? super T>getHandler()Gets the event consumer responsible for handling the eventbooleanisActive()Returns true if this handler is active
-
-
-
Method Detail
-
getEventClass
@NonNull Class<T> getEventClass()
Gets the class this handler is listening to- Returns:
- the event class
-
isActive
boolean isActive()
Returns true if this handler is active- Returns:
- true if this handler is still active
-
close
void close()
Unregisters this handler from the event bus.- Specified by:
closein interfaceAutoCloseable
-
-