Class PetLevelDownEvent


public class PetLevelDownEvent extends PetLevelEvent
Fired after an experience change pushes a pet's level down — the symmetric counterpart of PetLevelUpEvent. New level via PetLevelEvent.getLevel() (inherited); previous level via fromLevel().

Fires from PetExperience#updateExp on the down-transition (e.g., an addon-side removeExp call, or skilltree-induced exp loss).

Not cancellable: see PetLevelUpEvent — cancel the upstream PetExpEvent to suppress the entire cascade.

  • Constructor Details

    • PetLevelDownEvent

      public PetLevelDownEvent(Pet pet, int level, int fromLevel, boolean beQuiet)
      Creates the event for a pet that has just lost a level.
      Parameters:
      pet - the pet that levelled down
      level - the level it now holds
      fromLevel - the level it held before
      beQuiet - true to suppress the usual player-facing messaging
  • Method Details

    • getHandlerList

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

      public int fromLevel()
      Returns the level the pet held before this transition.
      Returns:
      the previous level
    • getHandlers

      public @NonNull HandlerList getHandlers()
      Overrides:
      getHandlers in class PetLevelEvent