Skip to content

Commit

Permalink
fix inventory.contains
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 25, 2017
1 parent 55d5285 commit 738c582
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1734,16 +1734,15 @@ else if (item != null && item.hasItemMeta() && item.getItemMeta().hasDisplayName
qty = attribute.getIntContext(2);
attribs = 2;
}
// TODO: Fix logic
List<dItem> contains = list.filter(dItem.class, attribute.getScriptEntry());
if (!contains.isEmpty()) {
for (dItem item : contains) {
if (containsItem(item, qty)) {
return Element.TRUE.getAttribute(attribute.fulfill(attribs));
if (!containsItem(item, qty)) {
return Element.FALSE.getAttribute(attribute.fulfill(attribs));
}
}
}
return Element.FALSE.getAttribute(attribute.fulfill(attribs));
return Element.TRUE.getAttribute(attribute.fulfill(attribs));
}

// <--[tag]
Expand Down

0 comments on commit 738c582

Please sign in to comment.