Fixed menu rendering bugs

This commit is contained in:
Auxilor
2022-10-03 12:59:54 +01:00
parent 4077a4c28b
commit aefdfa786d
5 changed files with 63 additions and 41 deletions

View File

@@ -107,7 +107,7 @@ public interface MenuBuilder extends PageBuilder {
* @return The builder.
*/
default MenuBuilder addPage(@NotNull final Page page) {
return this.addComponent(MenuLayer.TOP, 1, 1, page);
return this.addComponent(MenuLayer.UPPER, 1, 1, page);
}
/**

View File

@@ -79,7 +79,7 @@ public final class PageChanger implements GUIComponent {
return null;
}
if (page >= maxPage - 1 && this.direction == Direction.FORWARDS) {
if (page >= maxPage && this.direction == Direction.FORWARDS) {
return null;
}