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 Type
    Method
    Description
    @NotNull Class<T>
    Gets the subscribed event type.
    @NotNull org.bukkit.event.EventPriority
    Gets the listener priority.
    boolean
    Checks if this subscription is still active.
    boolean
    Checks if this subscription ignores cancelled events.
    void
    Unsubscribes this listener from receiving further events.
  • Method Details

    • getEventType

      @NotNull @NotNull Class<T> 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