Package io.artificial.enchantments.api
Interface EnchantmentEventBus.EventSubscription<T extends EnchantEffectEvent>
- Type Parameters:
T- the event type
- Enclosing interface:
EnchantmentEventBus
public static interface EnchantmentEventBus.EventSubscription<T extends EnchantEffectEvent>
Represents a subscription to an event type.
Use unsubscribe() to cancel the subscription and stop receiving events.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the subscribed event type.@NotNull org.bukkit.event.EventPriorityGets the listener priority.booleanisActive()Checks if this subscription is still active.booleanChecks if this subscription ignores cancelled events.voidUnsubscribes this listener from receiving further events.
-
Method Details
-
getEventType
Gets the subscribed event type.- Returns:
- the event class
- Since:
- 0.1.0
-
getPriority
@NotNull @NotNull org.bukkit.event.EventPriority getPriority()Gets the listener priority.- Returns:
- the event priority
- Since:
- 0.1.0
-
isIgnoreCancelled
boolean isIgnoreCancelled()Checks if this subscription ignores cancelled events.- Returns:
- true if ignoring cancelled events
- Since:
- 0.1.0
-
unsubscribe
void unsubscribe()Unsubscribes this listener from receiving further events.- Since:
- 0.1.0
-
isActive
boolean isActive()Checks if this subscription is still active.- Returns:
- true if still receiving events
- Since:
- 0.1.0
-