diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-05-16 00:26:22 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-05-16 00:26:22 -0400 |
commit | 7f73594aa86b93f28162173b0c8dec526ec510b3 (patch) | |
tree | 54bc8e40417ceb18ade5175e28a1a849d56e82d7 /src/main/java/org | |
parent | 8de2b52a025051952feb8a70343607e77402f4ae (diff) | |
download | craftbukkit-7f73594aa86b93f28162173b0c8dec526ec510b3.tar craftbukkit-7f73594aa86b93f28162173b0c8dec526ec510b3.tar.gz craftbukkit-7f73594aa86b93f28162173b0c8dec526ec510b3.tar.lz craftbukkit-7f73594aa86b93f28162173b0c8dec526ec510b3.tar.xz craftbukkit-7f73594aa86b93f28162173b0c8dec526ec510b3.zip |
Added get/setLastDamageCause. Thanks sunkid!
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 34ec97b7..c77e0336 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -7,6 +7,7 @@ import org.bukkit.Server; import org.bukkit.World; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.util.Vector; import java.util.List; @@ -14,6 +15,7 @@ import java.util.List; public abstract class CraftEntity implements org.bukkit.entity.Entity { protected final CraftServer server; protected Entity entity; + private EntityDamageEvent lastDamageEvent; public CraftEntity(final CraftServer server, final Entity entity) { this.server = server; @@ -254,4 +256,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setFallDistance(float distance) { getHandle().fallDistance = distance; } + + public void setLastDamageCause(EntityDamageEvent event) { + lastDamageEvent = event; + } + + public EntityDamageEvent getLastDamageCause() { + return lastDamageEvent; + } } |