Fixed the NullPointerException in the damage hook caused by a null attacker.

This commit is contained in:
sk89q 2011-01-10 13:00:04 -08:00
parent 66139dacac
commit bfa1734d23

View File

@ -1474,7 +1474,7 @@ public boolean onDamage(PluginLoader.DamageType type, BaseEntity attacker,
return true;
}
if (attacker.isPlayer()) {
if (attacker != null && attacker.isPlayer()) {
if (useRegions) {
Vector pt = new Vector(defender.getX(),
defender.getY(), defender.getZ());