Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
v0.7.1 | PagedGUI.java Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWylot committed Mar 31, 2022
1 parent b2d91af commit 6c76bcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/ir/wy/wycore/gui/PagedGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void addContent(Inventory inventory) {
inventory.setItem(inventory.getSize() - 7, ItemStackUtils.makeItem(previousPage));
}

int elementsPerPage = inventory.getSize() - (isPaged() ? 9 : 0);
int elementsPerPage = inventory.getSize() - (isPaged() || previousInventory != null ? 9 : 0);
List<T> objects = getPageObjects().stream()
.skip((long) (page - 1) * elementsPerPage)
.limit(elementsPerPage)
Expand Down

0 comments on commit 6c76bcb

Please sign in to comment.