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(Bat what,
boolean awake) |
Modifier and Type | Method and Description |
---|---|
static HandlerList |
getHandlerList() |
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 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 HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.