From d132c09426c60ac783da41a54912538e3a1b6db3 Mon Sep 17 00:00:00 2001 From: jameslfc19 Date: Tue, 23 Jun 2020 22:15:51 +0100 Subject: [PATCH] Update ChestLinkMenu.java Fixed items per page. --- .../minecraft/chests/inventories/ChestLinkMenu.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jamesdpeters/minecraft/chests/inventories/ChestLinkMenu.java b/src/main/java/com/jamesdpeters/minecraft/chests/inventories/ChestLinkMenu.java index d146e66..c15a299 100644 --- a/src/main/java/com/jamesdpeters/minecraft/chests/inventories/ChestLinkMenu.java +++ b/src/main/java/com/jamesdpeters/minecraft/chests/inventories/ChestLinkMenu.java @@ -51,6 +51,7 @@ public class ChestLinkMenu implements InventoryProvider { @Override public void init(Player player, InventoryContents contents) { Pagination pagination = contents.pagination(); + List itemList = new ArrayList<>(); for(InventoryStorage storage : storages){ ClickableItem item = storage.getClickableItem(player); @@ -63,7 +64,7 @@ public class ChestLinkMenu implements InventoryProvider { } pagination.setItems(itemList.toArray(new ClickableItem[0])); - pagination.setItemsPerPage(54); + pagination.setItemsPerPage(28); contents.fillBorders(ClickableItem.empty(Utils.getNamedItem(new ItemStack(Material.GRAY_STAINED_GLASS_PANE)," "))); for(ClickableItem item : pagination.getPageItems()){