Cancellablepublic class EntityRegainHealthEvent extends EntityEvent implements Cancellable
| Modifier and Type | Class | Description | 
|---|---|---|
| static class  | EntityRegainHealthEvent.RegainReason | An enum to specify the type of health regaining that is occurring | 
Event.Resultentity| Constructor | Description | 
|---|---|
| EntityRegainHealthEvent(Entity entity,
                       double amount,
                       EntityRegainHealthEvent.RegainReason regainReason) | |
| EntityRegainHealthEvent(Entity entity,
                       double amount,
                       EntityRegainHealthEvent.RegainReason regainReason,
                       boolean isFastRegen) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| double | getAmount() | Gets the amount of regained health | 
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| EntityRegainHealthEvent.RegainReason | getRegainReason() | Gets the reason for why the entity is regaining health | 
| boolean | isCancelled() | Gets the cancellation state of this event. | 
| boolean | isFastRegen() | Is this event a result of the fast regeneration mechanic | 
| void | setAmount(double amount) | Sets the amount of regained health | 
| void | setCancelled(boolean cancel) | Sets the cancellation state of this event. | 
getEntity, getEntityTypecallEvent, getEventName, isAsynchronouspublic EntityRegainHealthEvent(@NotNull Entity entity, double amount, @NotNull EntityRegainHealthEvent.RegainReason regainReason)
public EntityRegainHealthEvent(@NotNull Entity entity, double amount, @NotNull EntityRegainHealthEvent.RegainReason regainReason, boolean isFastRegen)
public boolean isFastRegen()
public double getAmount()
public void setAmount(double amount)
amount - the amount of health the entity will regainpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public EntityRegainHealthEvent.RegainReason getRegainReason()
@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.