Cancellable
public class BatToggleSleepEvent extends EntityEvent implements Cancellable
If a Bat Toggle Sleep event is cancelled, the Bat will not toggle its sleep state.
Event.Result
entity
Constructor | Description |
---|---|
BatToggleSleepEvent(@NotNull Bat what,
boolean awake) |
Modifier and Type | Method | Description |
---|---|---|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
boolean |
isAwake() |
Get whether or not the bat is attempting to awaken.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getEntity, getEntityType
callEvent, getEventName, isAsynchronous
public BatToggleSleepEvent(@NotNull @NotNull Bat what, boolean awake)
public boolean isAwake()
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.