Cancellable
public class EntityAirChangeEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor | Description |
---|---|
EntityAirChangeEvent(@NotNull Entity what,
int amount) |
Modifier and Type | Method | Description |
---|---|---|
int |
getAmount() |
Gets the amount of air the entity has left (measured in ticks).
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setAmount(int amount) |
Sets the amount of air remaining for the entity (measured in ticks.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
getEntity, getEntityType
callEvent, getEventName, isAsynchronous
public EntityAirChangeEvent(@NotNull @NotNull Entity what, int amount)
public int getAmount()
public void setAmount(int amount)
amount
- amount of air remainingpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.