diff options
author | sunkid <sunkid@iminurnetz.com> | 2011-07-19 13:26:00 -0700 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-07-28 01:51:09 -0400 |
commit | 7d4ec8b1835648a2108a46480a3c2fd9e846fa0c (patch) | |
tree | 062e0f584240b75998bd3f8f6bae96f2880bfc9c /src/main/java/net/minecraft/server/EntityArrow.java | |
parent | e2e4d7f4ca1d0a3c5948304343942f11cac340a9 (diff) | |
download | craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.gz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.lz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.tar.xz craftbukkit-7d4ec8b1835648a2108a46480a3c2fd9e846fa0c.zip |
Retiring EntityDamageByProjectileEvent in favor of EntityDamageEvent.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityArrow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityArrow.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index 69d40dfe..3e31abd8 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -5,7 +5,7 @@ import java.util.List; // CraftBukkit start import org.bukkit.craftbukkit.entity.CraftLivingEntity; import org.bukkit.entity.Projectile; -import org.bukkit.event.entity.EntityDamageByProjectileEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.ProjectileHitEvent; import org.bukkit.event.player.PlayerPickupItemEvent; @@ -179,15 +179,15 @@ public class EntityArrow extends Entity { Projectile projectile = (Projectile) this.getBukkitEntity(); // TODO deal with arrows being fired from a non-entity - EntityDamageByProjectileEvent event = new EntityDamageByProjectileEvent(damagee, projectile, EntityDamageEvent.DamageCause.ENTITY_ATTACK, 4); + EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, 4); server.getPluginManager().callEvent(event); this.shooter = (projectile.getShooter() == null) ? null : ((CraftLivingEntity) projectile.getShooter()).getHandle(); if (event.isCancelled()) { - stick = !event.getBounce(); + stick = !projectile.doesBounce(); } else { // this function returns if the arrow should stick in or not, i.e. !bounce - stick = movingobjectposition.entity.damageEntity(this.shooter, event.getDamage()); + stick = movingobjectposition.entity.damageEntity(this, event.getDamage()); } } else { stick = movingobjectposition.entity.damageEntity(this.shooter, 4); |