Fixed combat exp gain when hitting a friendly wolf

This commit is contained in:
bm01 2013-02-19 02:06:31 +01:00
parent ad68f50b14
commit 29fb8b83c2

View File

@ -69,6 +69,10 @@ public final class CombatTools {
return; return;
} }
if (target instanceof Tameable && isFriendlyPet(player, (Tameable) target)) {
return;
}
ItemStack heldItem = player.getItemInHand(); ItemStack heldItem = player.getItemInHand();
Material heldItemType = heldItem.getType(); Material heldItemType = heldItem.getType();
DamageCause damageCause = event.getCause(); DamageCause damageCause = event.getCause();