Package org.bukkit.event.entity
Class EntityUnleashEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityUnleashEvent
- Direct Known Subclasses:
PlayerUnleashEntityEvent
Called immediately prior to an entity being unleashed.
-
Nested Class Summary
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
ConstructorDescriptionEntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason)
Deprecated.EntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason, boolean dropLeash)
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
Returns the reason for the unleashing.boolean
Returns whether a leash item will be dropped.void
setDropLeash(boolean dropLeash)
Sets whether a leash item should be dropped.Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
EntityUnleashEvent
@Deprecated public EntityUnleashEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull EntityUnleashEvent.UnleashReason reason)Deprecated. -
EntityUnleashEvent
-
-
Method Details
-
getReason
Returns the reason for the unleashing.- Returns:
- The reason
-
isDropLeash
public boolean isDropLeash()Returns whether a leash item will be dropped.- Returns:
- Whether the leash item will be dropped
-
setDropLeash
public void setDropLeash(boolean dropLeash)Sets whether a leash item should be dropped.- Parameters:
dropLeash
- Whether the leash item should be dropped
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-