Last active
February 23, 2024 15:37
-
-
Save eltrueno/7a139b0cc5d19e2ecff6a2265a819610 to your computer and use it in GitHub Desktop.
Scrollable Menu by el_trueno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static ScrollableMenuModel getModel(){ | |
ItemStack air = new ItemStack(Material.AIR); | |
ItemStack nextpage = nolore(Material.ARROW, 1, 0, "§ePágina siguiente"); | |
ItemStack previouspage = nolore(Material.ARROW, 1, 0, "§ePágina anterior"); | |
ItemStack shop = nolore(Material.EMERALD, 1, 0, "§aVolver a la tienda"); | |
ScrollableMenuModel menumodel = new ScrollableMenuModel(54, air, | |
new ScrollableMenuSlot(ScrollableMenuSlot.SlotType.DECORATION, null, 0) | |
, new ScrollableMenuSlot(ScrollableMenuSlot.SlotType.NEXT_PAGE, nextpage, 41) | |
, new ScrollableMenuSlot(ScrollableMenuSlot.SlotType.PREVIOUS_PAGE, previouspage, 39) | |
, new ScrollableMenuSlot(ScrollableMenuSlot.SlotType.ITEM, null, 10,11,12,13,14,15,16,19,20,21,22,23,24,25,28,29,30,31,32,33,34) | |
, new ScrollableMenuSlot(ScrollableMenuSlot.SlotType.CUSTOM, shop, 49) | |
); | |
return menumodel; | |
} | |
ScrollableMenu menu = new ScrollableMenu("Cajas", getModel(), items); | |
p.openInventory(menu.getPage(0).getInventory()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment