Create severale pages menu
Methods
onCloseMenu [OVERRIDE]
This event is called when player close the menu
protected abstract void onCloseMenu(Player player);onOpenMenu [OVERRIDE]
This event is called when player open the menu
protected abstract void onOpenMenu(Player player);onSwitchPage [OVERRIDE]
This event is called when player change page of menu
protected abstract void onSwitchPage(Player player, int page);refreshPage
I'm inviting you to see the same doc on refreshPage in this part.
What's several page menu ?
several page menu is chest menu that allow you several pages. All pagination page logic is already set, you just have to place your items.
When you gonna give your menu size, the system will keep last 9 slot for him and you cannot place items on thoses 9 last slots.
Create your first menu
Now you have your menu, let's add it to menu system.
To init GuiManager, please refer to this documentation :
Add items in menu
This version is outdated. Please download latest release with versioning check system.
Some methods explained before does not exist in this version.
Why use GuiMenuPages ?
GuiMenuPages is made to create easly a menu that contains the number of pages you want.
This class is better than GuiMenu for severale pages.
As the same way as GuiMenu, GuiMenuPages contains constructor, init function and update function.
Let's see how to create this menu !
Your menu size is your content size. Do not calculate size with next and previous page items. It is added automatically in your menu.
To save your menu in the easy menu plugin please follow the instruction in Create normal menu.
Last updated