Bukkit
1.5.2-R1.0
Main Page
Related Pages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Enumerator
Pages
EntityDamageEvent.java
Go to the documentation of this file.
1
package
org.bukkit.event.entity;
2
3
import
org.bukkit.entity.Entity;
4
import
org.bukkit.event.Cancellable;
5
import
org.bukkit.event.HandlerList;
6
10
public
class
EntityDamageEvent
extends
EntityEvent
implements
Cancellable
{
11
private
static
final
HandlerList
handlers =
new
HandlerList
();
12
private
int
damage;
13
private
boolean
cancelled;
14
private
final
DamageCause
cause;
15
16
public
EntityDamageEvent
(
final
Entity
damagee,
final
DamageCause
cause,
final
int
damage) {
17
super(damagee);
18
this.cause = cause;
19
this.damage = damage;
20
}
21
22
public
boolean
isCancelled
() {
23
return
cancelled;
24
}
25
26
public
void
setCancelled
(
boolean
cancel) {
27
cancelled = cancel;
28
}
29
35
public
int
getDamage
() {
36
return
damage;
37
}
38
44
public
void
setDamage
(
int
damage) {
45
this.damage = damage;
46
}
47
53
public
DamageCause
getCause
() {
54
return
cause;
55
}
56
57
@Override
58
public
HandlerList
getHandlers
() {
59
return
handlers;
60
}
61
62
public
static
HandlerList
getHandlerList
() {
63
return
handlers;
64
}
65
69
public
enum
DamageCause
{
70
76
CONTACT
,
82
ENTITY_ATTACK
,
88
PROJECTILE
,
94
SUFFOCATION
,
100
FALL
,
106
FIRE
,
112
FIRE_TICK
,
118
MELTING
,
124
LAVA
,
130
DROWNING
,
136
BLOCK_EXPLOSION
,
142
ENTITY_EXPLOSION
,
148
VOID
,
154
LIGHTNING
,
160
SUICIDE
,
166
STARVATION
,
172
POISON
,
178
MAGIC
,
182
WITHER
,
190
FALLING_BLOCK
,
196
THORNS
,
202
CUSTOM
203
}
204
}
org
bukkit
event
entity
EntityDamageEvent.java
Generated on Thu Jun 20 2013 12:16:36 for Bukkit by
1.8.2