From e4d312a11fae57d5ad8da6d850476ce7c7957031 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 22 Feb 2012 18:43:09 -0800 Subject: [PATCH] Combat ignores events where entity is dead now. --- src/main/java/com/gmail/nossr50/Combat.java | 2 +- src/main/java/com/gmail/nossr50/skills/Taming.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/Combat.java b/src/main/java/com/gmail/nossr50/Combat.java index b8d06a00f..505a3c3fb 100644 --- a/src/main/java/com/gmail/nossr50/Combat.java +++ b/src/main/java/com/gmail/nossr50/Combat.java @@ -42,7 +42,7 @@ public class Combat { public static void combatChecks(EntityDamageEvent event, mcMMO pluginx) { - if(event.isCancelled() || event.getDamage() == 0) + if(event.isCancelled() || event.getDamage() == 0 || event.getEntity().isDead()) return; if(event instanceof EntityDamageByEntityEvent) diff --git a/src/main/java/com/gmail/nossr50/skills/Taming.java b/src/main/java/com/gmail/nossr50/skills/Taming.java index 4bac1c022..cdd04614a 100644 --- a/src/main/java/com/gmail/nossr50/skills/Taming.java +++ b/src/main/java/com/gmail/nossr50/skills/Taming.java @@ -35,7 +35,7 @@ public class Taming { public static void rewardXp(EntityDamageEvent event, mcMMO pluginx, Player master) { - if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId())) + if(!pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId())) { int xp = Combat.getXp(event.getEntity(), event); Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master); @@ -51,7 +51,6 @@ public class Taming public static void fastFoodService(PlayerProfile PPo, Wolf theWolf, EntityDamageEvent event) { - //Fast Food Service if(PPo.getSkillLevel(SkillType.TAMING) >= 50) { if(theWolf.getHealth() < theWolf.getMaxHealth())