Class PetExhaustionEvent

All Implemented Interfaces:
Cancellable

public class PetExhaustionEvent extends CancellablePetEvent
Fired when a pet's saturation drops to zero — the pet is hungry and would otherwise begin losing health. Lets addons award food, suppress the starvation hit, or surface custom messaging.

Fires from Pet#updateSaturation once per saturation-zero transition; after firing, if not canceled, the pet's health begins ticking down from hunger.

Cancellable: cancelling skips the starvation health-loss for this tick — but the saturation remains at 0, so the event will fire again next saturation tick unless something refills it (a food item, an addon, or /petadmin feed).

Pet state: live pet; owner online

  • Constructor Details

    • PetExhaustionEvent

      public PetExhaustionEvent(Pet pet)
      Creates the event for a pet that has run out of saturation.
      Parameters:
      pet - the hungry pet
  • Method Details

    • getHandlerList

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

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

      public Pet getPet()
      The pet whose saturation has reached zero.
      Specified by:
      getPet in class PetEvent
      Returns:
      the hungry pet