Class StatusLoadEvent

java.lang.Object
org.bukkit.event.Event
net.mathias2246.buildmc.api.event.CustomEvent
net.mathias2246.buildmc.api.event.player.StatusLoadEvent

public class StatusLoadEvent extends CustomEvent
Event fired during the loading (and reloading) phase of statuses.

This event allows plugins or internal systems to register or unregister StatusInstance objects before the status registry is finalized.

  • Constructor Details

    • StatusLoadEvent

      public StatusLoadEvent(@NotNull @NotNull BaseRegistry<StatusInstance> statusRegistry)
      Creates a new StatusLoadEvent.
      Parameters:
      statusRegistry - the registry that will contain all loaded statuses
  • Method Details

    • getStatusRegistry

      public BaseRegistry<StatusInstance> getStatusRegistry()
      Returns the registry being populated during this load event.
      Returns:
      the status registry
    • addStatus

      public void addStatus(StatusInstance status)
      Adds a status to the registry during the loading phase.
      Parameters:
      status - the status instance to register
    • removeStatus

      public void removeStatus(org.bukkit.NamespacedKey statusKey)
      Removes a previously registered status from the registry during loading.
      Parameters:
      statusKey - the namespaced key identifying the status to remove
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: CustomEvent
      Returns the HandlerList for this event type.

      Bukkit requires each concrete event class to define its own static HandlerList instance and to return it from this method. This is necessary for Bukkit’s event registration and dispatch system.

      Specified by:
      getHandlers in class CustomEvent
      Returns:
      the handler list for this event (never null)
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Required static method for Bukkit event registration.
      Returns:
      the handler list for this event type