Package org.bukkit.event.entity
Class EntityRemoveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityRemoveEvent
Called when an
Entity
is removed.
This event should only be used for monitoring. The result
of modifying the entity during or after this event is unspecified.
This event is not called for a Player
.
It differs from EntityRemoveFromWorldEvent
as to when it is called.
Modifications to the entity, as noted above, are not defined and are expected to not be persisted in e.g., chunk
unloads.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents various ways an entity gets removed.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionEntityRemoveEvent
(@NotNull Entity what, @NotNull EntityRemoveEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Gets the cause why the entity got removed.static @NotNull HandlerList
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
EntityRemoveEvent
-
-
Method Details
-
getCause
Gets the cause why the entity got removed.- Returns:
- the cause why the entity got removed
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-