Skip to content

Commit

Permalink
[System] Fix page count being one too high when last page is full
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakifrucht committed Nov 3, 2019
1 parent b0b37e2 commit 8c23049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -173,7 +173,7 @@ private int getPageCount() {
return 1;
}

return (menuItems.length / slotsUntilPagination) + 1;
return ((menuItems.length - 1) / slotsUntilPagination) + 1;
}

private boolean hasPreviousPage() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -21,7 +21,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hms.version>4.2.0</hms.version>
<hms.version>4.2.1</hms.version>
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
</properties>

Expand Down

0 comments on commit 8c23049

Please sign in to comment.