Class EntityRemoveFromWorldEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent

@NullMarked public class EntityRemoveFromWorldEvent extends EntityEvent
Fired any time an entity is being removed from a world for any reason (including a chunk unloading). Note: The entity is updated prior to this event being called, as such, the entity's world may not be equal to getWorld().
  • Constructor Details

    • EntityRemoveFromWorldEvent

      @Internal public EntityRemoveFromWorldEvent(Entity entity, World world)
  • Method Details

    • getWorld

      public World getWorld()
      Returns:
      The world that the entity is being removed from
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()