Skip to content

Commit

Permalink
Fix dList.exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 11, 2013
1 parent e23f10c commit e1d1e62
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dList.java
Expand Up @@ -265,12 +265,17 @@ public String getAttribute(Attribute attribute) {
// Create a new dList that will contain the exclusions
dList list = new dList(this);
// Iterate through
for (String exclusion : exclusions)
for (String value : list)
for (String exclusion : exclusions) {
for (int i = 0;i < list.size();i++) {
String value = list.get(i);
// If the value of the list equals the value of the exclusion,
// remove it.
if (value.equalsIgnoreCase(exclusion))
if (value.equalsIgnoreCase(exclusion)) {
list.remove(value);
i--;
}
}
}

// Return the modified list
return list.getAttribute(attribute.fulfill(1));
Expand Down

0 comments on commit e1d1e62

Please sign in to comment.