Cancellable
EntityCombustByBlockEvent
, EntityCombustByEntityEvent
public class EntityCombustEvent extends EntityEvent implements Cancellable
If an Entity Combust event is cancelled, the entity will not combust.
Event.Result
entity
Constructor | Description |
---|---|
EntityCombustEvent(@NotNull Entity combustee,
int duration) |
Modifier and Type | Method | Description |
---|---|---|
int |
getDuration() |
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setDuration(int duration) |
The number of seconds the combustee should be alight for.
|
getEntity, getEntityType
getEventName, isAsynchronous
public EntityCombustEvent(@NotNull @NotNull Entity combustee, int duration)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic int getDuration()
public void setDuration(int duration)
This value will only ever increase the combustion time, not decrease existing combustion times.
duration
- the time in seconds to be alight for.@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.