Package org.bukkit.event.entity
Class EntityUnleashEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityUnleashEvent
- All Implemented Interfaces:
- Cancellable
- Direct Known Subclasses:
- PlayerUnleashEntityEvent
Called immediately prior to an entity being unleashed.
 
Cancelling this event when either:
- the leashed entity dies,
- the entity changes dimension, or
- the client has disconnected the leash
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason) Deprecated.EntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason, boolean dropLeash) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListReturns the reason for the unleashing.booleanGets the cancellation state of this event.booleanReturns whether a leash item will be dropped.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetDropLeash(boolean dropLeash) Sets whether a leash item should be dropped.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntity, getEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
EntityUnleashEvent@Deprecated public EntityUnleashEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull EntityUnleashEvent.UnleashReason reason) Deprecated.
- 
EntityUnleashEvent
 
- 
- 
Method Details- 
getReasonReturns the reason for the unleashing.- Returns:
- The reason
 
- 
isDropLeashpublic boolean isDropLeash()Returns whether a leash item will be dropped.- Returns:
- Whether the leash item will be dropped
 
- 
setDropLeashpublic void setDropLeash(boolean dropLeash) Sets whether a leash item should be dropped.- Parameters:
- dropLeash- Whether the leash item should be dropped
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-