net.minecraftforge.event.entity.living

## Class LivingSpawnEvent.AllowDespawn

- java.lang.Object
- - net.minecraftforge.event.Event
  - - net.minecraftforge.event.entity.EntityEvent
    - - net.minecraftforge.event.entity.living.LivingEvent
      - - net.minecraftforge.event.entity.living.LivingSpawnEvent
        - - net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn

- Enclosing class:
    LivingSpawnEvent

      public static class LivingSpawnEvent.AllowDespawn
      extends LivingSpawnEvent

  Fired each tick for despawnable mobs to allow control over despawning. `Result#DEFAULT` will pass the mob on to vanilla despawn mechanics. `Result#ALLOW` will force the mob to despawn. `Result#DENY` will force the mob to remain. This is fired every tick for every despawnable entity. Be efficient in your handlers. Note: this is not fired if the mob is definitely going to otherwise despawn. It is fired to check if the mob can be allowed to despawn. See `EntityLiving.despawnEntity()`
  Author:
    cpw

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent

      `LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent

      `EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.Event

      `Event.HasResult, Event.Result`

  - ### Field Summary

    - ### Fields inherited from class net.minecraftforge.event.entity.living.LivingSpawnEvent

      `world, x, y, z`

    - ### Fields inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `entityLiving`

    - ### Fields inherited from class net.minecraftforge.event.entity.EntityEvent

      `entity`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LivingSpawnEvent.AllowDespawn(EntityLiving entity)`

  - ### Method Summary

    - ### Methods inherited from class net.minecraftforge.event.Event

      `getListenerList, getResult, hasResult, isCancelable, isCanceled, setCanceled, setResult`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LivingSpawnEvent.AllowDespawn

          public LivingSpawnEvent.AllowDespawn(EntityLiving entity)