Skip to content

Commit

Permalink
Fix projectile identifying in EntityDamaged
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jun 24, 2015
1 parent e77cdca commit 41fa075
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -100,7 +100,11 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
String target = cmd.equals("damages") ? CoreUtilities.getXthArg(2, lower): CoreUtilities.getXthArg(0, lower);
if (attacker.length() > 0) {
if (damager != null) {
if( !damager.matchesEntity(attacker) && !cause.asString().equals(attacker)) {
boolean projectileMatched = false;
if (projectile != null) {
projectileMatched = projectile.matchesEntity(attacker);
}
if (!projectileMatched && !damager.matchesEntity(attacker) && !cause.asString().equals(attacker)) {
return false;
}
}
Expand Down

0 comments on commit 41fa075

Please sign in to comment.