Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.entity.EntityRegainHealthEvent Class Reference
Inheritance diagram for org.bukkit.event.entity.EntityRegainHealthEvent:
org.bukkit.event.entity.EntityEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Classes

enum  RegainReason
 

Public Member Functions

 EntityRegainHealthEvent (final Entity entity, final int amount, final RegainReason regainReason)
 
 EntityRegainHealthEvent (final Entity entity, final double amount, final RegainReason regainReason)
 
double getAmount ()
 
int _INVALID_getAmount ()
 
void setAmount (double amount)
 
void _INVALID_setAmount (int amount)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
RegainReason getRegainReason ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 
EntityType getEntityType ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.entity.EntityEvent
Entity entity
 

Detailed Description

Stores data for health-regain events

Definition at line 11 of file EntityRegainHealthEvent.java.

Member Function Documentation

int org.bukkit.event.entity.EntityRegainHealthEvent._INVALID_getAmount ( )

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

Definition at line 43 of file EntityRegainHealthEvent.java.

References org.bukkit.event.entity.EntityRegainHealthEvent.getAmount().

43  {
44  return NumberConversions.ceil(getAmount());
45  }
void org.bukkit.event.entity.EntityRegainHealthEvent._INVALID_setAmount ( int  amount)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

Definition at line 62 of file EntityRegainHealthEvent.java.

References org.bukkit.event.entity.EntityRegainHealthEvent.setAmount().

62  {
63  setAmount(amount);
64  }
double org.bukkit.event.entity.EntityRegainHealthEvent.getAmount ( )

Gets the amount of regained health

Returns
The amount of health regained

Definition at line 33 of file EntityRegainHealthEvent.java.

Referenced by org.bukkit.event.entity.EntityRegainHealthEvent._INVALID_getAmount().

33  {
34  return amount;
35  }
RegainReason org.bukkit.event.entity.EntityRegainHealthEvent.getRegainReason ( )

Gets the reason for why the entity is regaining health

Returns
A RegainReason detailing the reason for the entity regaining health

Definition at line 80 of file EntityRegainHealthEvent.java.

80  {
81  return regainReason;
82  }
boolean org.bukkit.event.entity.EntityRegainHealthEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 66 of file EntityRegainHealthEvent.java.

66  {
67  return cancelled;
68  }
void org.bukkit.event.entity.EntityRegainHealthEvent.setAmount ( double  amount)

Sets the amount of regained health

Parameters
amountthe amount of health the entity will regain

Definition at line 52 of file EntityRegainHealthEvent.java.

Referenced by org.bukkit.event.entity.EntityRegainHealthEvent._INVALID_setAmount().

52  {
53  this.amount = amount;
54  }
void org.bukkit.event.entity.EntityRegainHealthEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 70 of file EntityRegainHealthEvent.java.

70  {
71  cancelled = cancel;
72  }

The documentation for this class was generated from the following file: