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 and Description |
---|
BatToggleSleepEvent(@NotNull Bat what,
boolean awake) |
Modifier and Type | Method and 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 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 © 2021. All rights reserved.