public class EntityUnleashEvent extends EntityEvent
Modifier and Type | Class and Description |
---|---|
static class |
EntityUnleashEvent.UnleashReason |
Event.Result
entity
Constructor and Description |
---|
EntityUnleashEvent(@NotNull Entity entity,
@NotNull EntityUnleashEvent.UnleashReason reason)
Deprecated.
|
EntityUnleashEvent(@NotNull Entity entity,
@NotNull EntityUnleashEvent.UnleashReason reason,
boolean dropLeash) |
Modifier and Type | Method and Description |
---|---|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull EntityUnleashEvent.UnleashReason |
getReason()
Returns the reason for the unleashing.
|
boolean |
isDropLeash()
Returns whether a leash item will be dropped.
|
void |
setDropLeash(boolean dropLeash)
Sets whether a leash item should be dropped.
|
getEntity, getEntityType
callEvent, getEventName, isAsynchronous
@Deprecated public EntityUnleashEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull EntityUnleashEvent.UnleashReason reason)
@NotNull public @NotNull EntityUnleashEvent.UnleashReason getReason()
public boolean isDropLeash()
public void setDropLeash(boolean dropLeash)
dropLeash
- Whether the leash item should be dropped@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.