Package de.Keyle.MyPet.api.event
Class PetActivatedEvent
java.lang.Object
org.bukkit.event.Event
de.Keyle.MyPet.api.event.PetEvent
de.Keyle.MyPet.api.event.PetActivatedEvent
Fired after a pet has finished transitioning from at-rest (
PersistedPet)
to live (Pet) — i.e., once the runtime entity exists, all skills are
registered and rebuilt from persisted state, and the pet is in the active-pets map.
Fires from PetManager.activatePet(StoredPet) and from the clone
path that follows pet-type transformations.
Not cancellable: activation has already completed before this event
is dispatched. Use PetCallEvent earlier in the call flow if you need
to veto a pet coming live.
Pet state: getPet() returns a fully initialized live pet.
The pet entity may not yet be spawned in the world — activation is logical, not
spatial; the world entity is created when the owner uses /mypet call.
Related events: PetLoadEvent fires earlier in the same flow
(before any wiring happens, while the pet is still a StoredPet).
PetCallEvent can fire afterward when the owner spawns the pet entity.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPetActivatedEvent(Pet pet) Creates the event for a pet that has finished activating. -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListReturns the handler list for this event type.getPet()The pet that has just become live.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PetActivatedEvent
Creates the event for a pet that has finished activating.- Parameters:
pet- the now-live pet
-
-
Method Details
-
getHandlerList
Returns the handler list for this event type.- Returns:
- the shared
HandlerListeveryPetActivatedEventis dispatched through
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getPet
The pet that has just become live.
-