Class RegistryApplyEvent<T>

java.lang.Object
org.bukkit.event.Event
com.github.darksoulq.abyssallib.server.event.custom.server.RegistryApplyEvent<T>
Type Parameters:
T - The type of objects managed by the registries.
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class RegistryApplyEvent<T> extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Custom event triggered when a DeferredRegistry is applied to a Registry.

This event is cancellable, allowing control over whether the registry data is applied.

  • Constructor Details

    • RegistryApplyEvent

      public RegistryApplyEvent(@NotNull @NotNull Registry<T> target, @NotNull @NotNull DeferredRegistry<T> source)
      Constructs a new RegistryApplyEvent.
      Parameters:
      target - The registry to apply the data to.
      source - The deferred registry to be applied.
  • Method Details

    • target

      @NotNull public @NotNull Registry<T> target()
      Gets the target registry that the DeferredRegistry is being applied to.
      Returns:
      The target Registry.
    • source

      @NotNull public @NotNull DeferredRegistry<T> source()
      Gets the DeferredRegistry being applied.
      Returns:
      The source DeferredRegistry.
    • isCancelled

      public boolean isCancelled()
      Checks whether the event is cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if the event is cancelled, false otherwise.
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets the cancellation state of this event.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - true to cancel the event, false to allow it to proceed.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event.
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      The handler list.
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()