Fix giving wrong arguments to callEntityDamageEvent. Forgot to update after changing the signature :(

This commit is contained in:
Erik Broes 2012-01-18 08:16:38 +01:00
parent 112e0816b9
commit 737cf284e3

View File

@ -81,7 +81,7 @@ public class MobEffectList {
} else if (this.id == POISON.id) { } else if (this.id == POISON.id) {
if (entityliving.getHealth() > 1) { if (entityliving.getHealth() > 1) {
// CraftBukkit start // 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); Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled() && event.getDamage() > 0) { 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())) { } 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()) { if (this.id == HARM.id && !entityliving.aE() || this.id == HEAL.id && entityliving.aE()) {
// CraftBukkit start // 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); Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled() && event.getDamage() > 0) { if (!event.isCancelled() && event.getDamage() > 0) {