Package de.Keyle.MyPet.api.behavior
package de.Keyle.MyPet.api.behavior
Per-pet-type handling of Bukkit events.
A PetBehavior binds one Bukkit event type to a PetEventHandler for a
single pet species. Behaviors are declared as public static final fields on the
matching PetXxx class and pick themselves up through
PetBehaviorRegistry; a central dispatcher then routes each incoming event to the
behaviors registered for the pet it concerns, so no species needs its own listener.
PetBehaviorHelpers provides factory methods for the common Bukkit event
shapes, which is the normal way to build a behavior.
-
ClassDescriptionPetBehavior<E extends Event>One per-pet event handler, dispatched by the central
PetBehaviorDispatcher.Factory methods forPetBehavior, one per common Bukkit event shape.Central registry of everyPetBehaviordeclared as a static field on a pet class.PetEventHandler<E extends Event>Functional handler invoked by the central dispatcher when aEventfires on a pet whose type matches a registeredPetBehavior.