diff options
author | speakeasy <mekevin1917@gmail.com> | 2011-01-20 05:41:02 +0800 |
---|---|---|
committer | tahg <tahgtahv@gmail.com> | 2011-01-20 05:52:36 +0800 |
commit | e93061be489dc6f3b4950284e41e50501e55450f (patch) | |
tree | 8d10f06a8c493742878f9f30502adda35c208182 /src/main/java/net/minecraft/server/EntityArrow.java | |
parent | eabdc7ffa9d9062389cd7608768e021c04151a98 (diff) | |
download | craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.gz craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.lz craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.xz craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.zip |
Fix up NPE's in EntityMinecart/CraftVehicle and removed a little un-needed code in EntityArrow
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityArrow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityArrow.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index 11ae6954..f068b3fa 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -178,9 +178,7 @@ public class EntityArrow extends Entity { // or leave as DamageCause.ENTITY_ATTACK org.bukkit.entity.Entity shooter = null; if ((EntityLiving)b != null) { - shooter = new org.bukkit.craftbukkit.entity.CraftLivingEntity(server, b); - } else if ((Entity)b != null) { - shooter = (org.bukkit.entity.Entity) b.getBukkitEntity(); + shooter = b.getBukkitEntity(); } EntityDamageByProjectileEvent edbpe = new EntityDamageByProjectileEvent(shooter, entity.getBukkitEntity(), this.getBukkitEntity(), EntityDamageEvent.DamageCause.ENTITY_ATTACK, 4); |