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

Classes

enum  DamageCause
 

Public Member Functions

 EntityDamageEvent (final Entity damagee, final DamageCause cause, final int damage)
 
 EntityDamageEvent (final Entity damagee, final DamageCause cause, final double damage)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
double getDamage ()
 
int _INVALID_getDamage ()
 
void setDamage (double damage)
 
void _INVALID_setDamage (int damage)
 
DamageCause getCause ()
 
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 damage events

Definition at line 11 of file EntityDamageEvent.java.

Member Function Documentation

int org.bukkit.event.entity.EntityDamageEvent._INVALID_getDamage ( )

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 51 of file EntityDamageEvent.java.

References org.bukkit.event.entity.EntityDamageEvent.getDamage().

51  {
52  return NumberConversions.ceil(getDamage());
53  }
void org.bukkit.event.entity.EntityDamageEvent._INVALID_setDamage ( int  damage)

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 70 of file EntityDamageEvent.java.

References org.bukkit.event.entity.EntityDamageEvent.setDamage().

70  {
71  setDamage(damage);
72  }
DamageCause org.bukkit.event.entity.EntityDamageEvent.getCause ( )

Gets the cause of the damage.

Returns
A DamageCause value detailing the cause of the damage.

Definition at line 79 of file EntityDamageEvent.java.

79  {
80  return cause;
81  }
double org.bukkit.event.entity.EntityDamageEvent.getDamage ( )

Gets the amount of damage caused by the event

Returns
The amount of damage caused by the event

Definition at line 41 of file EntityDamageEvent.java.

Referenced by org.bukkit.event.entity.EntityDamageEvent._INVALID_getDamage().

41  {
42  return damage;
43  }
boolean org.bukkit.event.entity.EntityDamageEvent.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 28 of file EntityDamageEvent.java.

28  {
29  return cancelled;
30  }
void org.bukkit.event.entity.EntityDamageEvent.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 32 of file EntityDamageEvent.java.

32  {
33  cancelled = cancel;
34  }
void org.bukkit.event.entity.EntityDamageEvent.setDamage ( double  damage)

Sets the amount of damage caused by the event

Parameters
damageThe amount of damage caused by the event

Definition at line 60 of file EntityDamageEvent.java.

Referenced by org.bukkit.event.entity.EntityDamageEvent._INVALID_setDamage().

60  {
61  this.damage = damage;
62  }

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