From 737cf284e33af978431b0443aa2cd43b2e10f6bc Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Wed, 18 Jan 2012 08:16:38 +0100 Subject: [PATCH] Fix giving wrong arguments to callEntityDamageEvent. Forgot to update after changing the signature :( --- src/main/java/net/minecraft/server/MobEffectList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/MobEffectList.java b/src/main/java/net/minecraft/server/MobEffectList.java index dea14775e0..4d178290c5 100644 --- a/src/main/java/net/minecraft/server/MobEffectList.java +++ b/src/main/java/net/minecraft/server/MobEffectList.java @@ -81,7 +81,7 @@ public class MobEffectList { } else if (this.id == POISON.id) { if (entityliving.getHealth() > 1) { // CraftBukkit start - EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, (EntityLiving) entityliving.getBukkitEntity(), DamageCause.POISON, 1); + EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, entityliving, DamageCause.POISON, 1); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled() && event.getDamage() > 0) { @@ -94,7 +94,7 @@ public class MobEffectList { } else if ((this.id != HEAL.id || entityliving.aE()) && (this.id != HARM.id || !entityliving.aE())) { if (this.id == HARM.id && !entityliving.aE() || this.id == HEAL.id && entityliving.aE()) { // CraftBukkit start - EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, (EntityLiving) entityliving.getBukkitEntity(), DamageCause.MAGIC, 6 << i); + EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, entityliving, DamageCause.MAGIC, 6 << i); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled() && event.getDamage() > 0) {