Skip to content

Commit

Permalink
Fix issue with PaginatedGui's bindings not being cleared on redraw (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Nov 19, 2017
1 parent cbd95ed commit ca8e8c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<artifactId>helper</artifactId>
<packaging>jar</packaging>
<version>3.1.5</version>
<version>3.1.6</version>

<name>helper</name>
<description>A utility to reduce boilerplate code in Bukkit plugins.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public void redraw() {
// can't go back further
// remove the item if the current slot contains a previous page item type
Slot slot = getSlot(previousPageSlot);
slot.clearBindings();
if (slot.hasItem() && slot.getItem().getType() == previousPageItem.apply(PageInfo.create(0, 0)).getType()) {
slot.clearItem();
}
Expand All @@ -106,6 +107,7 @@ public void redraw() {
// can't go forward a page
// remove the item if the current slot contains a next page item type
Slot slot = getSlot(nextPageSlot);
slot.clearBindings();
if (slot.hasItem() && slot.getItem().getType() == nextPageItem.apply(PageInfo.create(0, 0)).getType()) {
slot.clearItem();
}
Expand Down

0 comments on commit ca8e8c3

Please sign in to comment.