Fixed ClassCastException with Taming

This commit is contained in:
GJ 2012-03-04 23:11:31 -05:00
parent dc9acbc3c9
commit 4d99fe7230
4 changed files with 6 additions and 16 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 2.0.00-dev Version 2.0.00-dev
+ Added Ocelots to Taming XP tables + Added Ocelots to Taming XP tables
+ Added ability to summon Ocelots with Call of the Wild + Added ability to summon Ocelots with Call of the Wild
= Fixed ClassCastException from Taming preventDamage checks
Version 1.3.02 Version 1.3.02
+ Added in game guides for Mining, Excavation, and Acrobatics. Simply type /skillname ? to access them + Added in game guides for Mining, Excavation, and Acrobatics. Simply type /skillname ? to access them

View File

@ -167,16 +167,6 @@ public class Combat
Swords.counterAttackChecks(event); Swords.counterAttackChecks(event);
Acrobatics.dodgeChecks(event); Acrobatics.dodgeChecks(event);
} }
/*
* DEFENSIVE CHECKS FOR WOLVES
*/
//else if(target instanceof Wolf)
//{
// Wolf wolf = (Wolf) target;
// if(wolf.isTamed() && (wolf.getOwner() instanceof Player))
// Taming.preventDamage(event, pluginx);
//}
} }
public static void combatAbilityChecks(Player attacker, PlayerProfile PPa) public static void combatAbilityChecks(Player attacker, PlayerProfile PPa)

View File

@ -309,11 +309,10 @@ public class mcBlockListener implements Listener
WoodCutting.leafBlower(player, block); WoodCutting.leafBlower(player, block);
} }
} }
else{ else if(inhand.getTypeId() != 359)
if(inhand.getTypeId() != 359){ {
event.setInstaBreak(true); event.setInstaBreak(true);
WoodCutting.leafBlower(player, block); WoodCutting.leafBlower(player, block);
}
} }
} }

View File

@ -124,7 +124,7 @@ public class mcEntityListener implements Listener
break; break;
case WOLF: case WOLF:
Wolf wolf = (Wolf) entity; Wolf wolf = (Wolf) entity;
if((!m.isInvincible(wolf, event)) && wolf.isTamed() && wolf.getOwner() != null) if((!m.isInvincible(wolf, event)) && wolf.isTamed() && (wolf.getOwner() instanceof Player))
Taming.preventDamage(event, plugin); Taming.preventDamage(event, plugin);
break; break;
} }