Skip to content

Commit 8aff1aa

Browse files
use .create instead of new
1 parent ae3597f commit 8aff1aa

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/main/java/me/flame/menus/menu/SeparatedPagedMenu.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,11 @@ private SeparatedPagedMenu(@NotNull UUID uuid, MenuType type, final int pageCoun
9090
super(type, title, EnumSet.noneOf(Modifier.class));
9191
this.uuid = uuid;
9292
this.player = Objects.requireNonNull(Bukkit.getPlayer(uuid));
93-
this.mainInventory = new PaginatedMenu(pageRows, pageCount, title, EnumSet.noneOf(Modifier.class));
93+
this.mainInventory = PaginatedMenu.create(title, pageRows, pageCount, EnumSet.noneOf(Modifier.class));
9494

9595
this.pages = pageCount;
9696
}
9797

98-
/**
99-
* Sets the page size
100-
*
101-
* @param pageRows The new page size
102-
* @return The GUI for easier use when declaring, works like a builder
103-
*/
104-
public SeparatedPagedMenu setPageSize(final int pageRows) {
105-
this.pageRows = pageRows;
106-
this.pageSize = pageRows * 9;
107-
return this;
108-
}
109-
11098
/**
11199
* Updates the page {@link MenuItem} on the slot in the page
112100
* Can get the slot from {@link InventoryClickEvent#getSlot()}

0 commit comments

Comments
 (0)