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 Summary
Nested ClassesNested 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
ConstructorsConstructorDescriptionEntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason) Deprecated.EntityUnleashEvent(@NotNull Entity entity, @NotNull EntityUnleashEvent.UnleashReason reason, boolean dropLeash)  - 
Method Summary
Modifier 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.EntityEvent
getEntity, getEntityTypeMethods 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
 - 
isCancelled
public 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 interfaceCancellable- Returns:
 - true if this event is cancelled
 
 - 
setCancelled
public 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 interfaceCancellable- Parameters:
 cancel- true if you wish to cancel this event
 - 
getHandlers
- Specified by:
 getHandlersin classEvent
 - 
getHandlerList
 
 -