Package de.Keyle.MyPet.api.event
Class PetLoadEvent
java.lang.Object
org.bukkit.event.Event
de.Keyle.MyPet.api.event.PetEvent
de.Keyle.MyPet.api.event.PetLoadEvent
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPetLoadEvent(StoredPet pet) Creates the event for a stored pet handed over for activation. -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListReturns the handler list for this event type.getPet()The stored pet about to be wired up as a livePet.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PetLoadEvent
Creates the event for a stored pet handed over for activation.- Parameters:
pet- the pet at rest, not yet live
-
-
Method Details
-
getHandlerList
Returns the handler list for this event type.- Returns:
- the shared
HandlerListeveryPetLoadEventis dispatched through
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getPet
The stored pet about to be wired up as a livePet.
-