1
mirror of https://github.com/CarmJos/EasyPlugin.git synced 2024-09-19 19:25:45 +00:00

fix(gui): 修复翻页GUI可能出现幽灵页的问题。

This commit is contained in:
Carm Jos 2023-03-05 00:10:31 +08:00
parent 0e74d6864c
commit 391f9b6389

View File

@ -117,7 +117,7 @@ public class CommonPagedGUI extends PagedGUI {
* @return 最后一页的页码
*/
public int getLastPageNumber() {
return (this.container.size() / range.length) + 1;
return (this.container.size() / range.length) + ((this.container.size() % range.length) == 0 ? 0 : 1);
}
/**