Interface TKeyedEvent<T>


public interface TKeyedEvent<T>
Similar to TEvent, except this one stores its listeners in a Map in key-value pairs. This allows listeners to be "identifiable", so they can easily be added, accessed, and removed.

The event handler insertion order is preserved.
See Also:
  • Method Details

    • invoker

      T invoker()
    • register

      default boolean register(net.minecraft.util.Identifier key, T listener)
    • register

      boolean register(String key, T listener)
    • unregister

      default boolean unregister(net.minecraft.util.Identifier key)
    • unregister

      boolean unregister(String key)
    • isRegistered

      default boolean isRegistered(net.minecraft.util.Identifier key)
    • isRegistered

      boolean isRegistered(String key)
    • clearListeners

      void clearListeners()