PetListeners

public final class PetListeners implements Listener

Routes clicks, damage, deaths, removals, new chunks, world saves and player sessions to PetManager.

Constructors

Link copied to clipboard
public void PetListeners()

Functions

Link copied to clipboard
public void onChunkLoad(ChunkLoadEvent event)
New chunks are stocked with wild pets as they generate, like vanilla's farm animals.
Link copied to clipboard
public void onDamage(EntityDamageEvent event)
Link copied to clipboard
public void onDeath(EntityDeathEvent event)
Link copied to clipboard
public void onEntitiesLoad(EntitiesLoadEvent event)
Pet bodies are never saved, but a crash can leave one in a chunk; nothing would drive or show it.
Link copied to clipboard
public void onInteract(PlayerInteractEntityEvent event)
Link copied to clipboard
public void onInteractAt(PlayerInteractAtEntityEvent event)
Link copied to clipboard
public void onJoin(PlayerJoinEvent event)
Link copied to clipboard
A pet's model touched a player: a wild pet remembers it for its sting module; no pet deals FMM's contact attack.
Link copied to clipboard
A left-click on a pet that cannot be hurt never becomes an attack.
Link copied to clipboard
A right-click on the model itself, which hides the body from clients.
Link copied to clipboard
public void onQuit(PlayerQuitEvent event)
Link copied to clipboard
public void onRemove(EntityRemoveEvent event)
A live wild pet another plugin removed stays gone; one whose chunk stopped ticking waits to come back.
Link copied to clipboard
public void onTargeted(EntityTargetLivingEntityEvent event)
Link copied to clipboard
public void onWorldChange(PlayerChangedWorldEvent event)
Link copied to clipboard
public void onWorldSave(WorldSaveEvent event)