Class PetLoadEvent


public class PetLoadEvent extends PetEvent
Fired when the repository hands a stored pet to PetManager for activation — i.e., just before the manager wires it up as a live Pet. The pet exposed via getPet() is still a StoredPet (concretely a PersistedPet record); skills have not yet been instantiated.

Fires from PetManager.activatePet before any setup runs.

Not cancellable: activation always proceeds. Listeners use this for read-only auditing, attaching addon-side state to the about-to-be-live pet, or pre-populating caches keyed on UUID.

Pet state: persisted, never live. Owner is set; player may be online or offline (the manager activates pets eagerly on owner-join, but the resolved player may be null in race-condition windows).

Related events: PetActivatedEvent fires after activation completes. The pair Load → Activated brackets the entire activation flow; nothing else dispatches between them on the main thread.

  • Constructor Details

    • PetLoadEvent

      public PetLoadEvent(StoredPet pet)
      Creates the event for a stored pet handed over for activation.
      Parameters:
      pet - the pet at rest, not yet live
  • Method Details

    • getHandlerList

      public static HandlerList getHandlerList()
      Returns the handler list for this event type.
      Returns:
      the shared HandlerList every PetLoadEvent is dispatched through
    • getHandlers

      public @NonNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getPet

      public StoredPet getPet()
      The stored pet about to be wired up as a live Pet.
      Specified by:
      getPet in class PetEvent
      Returns:
      the pet at rest, about to be activated