Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 15, 2013
1 parent 9e70e4a commit 8ead434
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -433,7 +433,7 @@ public boolean isProjectile() {
*/

public dEntity getShooter() {
if (isProjectile() && hasShooter())
if (hasShooter())
return new dEntity(getProjectile().getShooter());
else
return null;
Expand Down
Expand Up @@ -1471,7 +1471,7 @@ else if (damager.isPlayer()) {

// If the damager is a projectile, add its shooter (which can be null)
// to the context
else if (damager.isProjectile()) {
else if (damager.hasShooter()) {
dEntity shooter = damager.getShooter();
context.put("shooter", shooter.getDenizenObject());
}
Expand Down

0 comments on commit 8ead434

Please sign in to comment.