Skip to content

Commit

Permalink
Simplify dEntity.matchesEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 9, 2015
1 parent c62c1ff commit 55ee8d3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -1250,14 +1250,10 @@ public boolean matchesEntity(String ent) {
if (entity != null && getEntityScript() != null) {
return ent.equalsIgnoreCase(getEntityScript());
}
dEntity e = dEntity.valueOf(ent, new BukkitTagContext(null, null, false, null, false, null));
if (e == null) {
return false;
}
if (entity == null) {
return e.entity == null && entity_type == e.entity_type;
if (uuid != null && uuid.toString().equals(ent)) {
return true;
}
return e.entity != null && getUUID().equals(e.getUUID());
return false;
}

@Override
Expand Down

0 comments on commit 55ee8d3

Please sign in to comment.