Skip to content

Commit

Permalink
fix(inventory): Don't show empty slots. Extends #105
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Jul 10, 2018
1 parent 0ac1bc8 commit c8a97fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/valandur/webapi/cache/misc/CachedInventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public CachedInventory(Inventory inv) {
try {
this.slots = new ArrayList<>();
for (Inventory subInv : inv.slots()) {
if (subInv.totalItems() == 0) {
continue;
}
this.slots.add(new CachedSlot((Slot) subInv));
}
} catch (AbstractMethodError ignored) {}
Expand Down

0 comments on commit c8a97fd

Please sign in to comment.