Class Listenable<L>

java.lang.Object
net.kyori.adventure.util.Listenable<L>
Type Parameters:
L - the listener type

public abstract class Listenable<L> extends Object
Something that has listeners.
Since:
4.0.0
  • Constructor Details

    • Listenable

      public Listenable()
  • Method Details

    • forEachListener

      protected final void forEachListener(@NotNull @NotNull Consumer<L> consumer)
      Process an action for each listener.
      Parameters:
      consumer - the consumer
      Since:
      4.0.0
    • addListener0

      protected final void addListener0(@NotNull L listener)
      Adds a listener.
      Parameters:
      listener - the listener
      Since:
      4.0.0
    • removeListener0

      protected final void removeListener0(@NotNull L listener)
      Removes a listener.
      Parameters:
      listener - the listener
      Since:
      4.0.0