GuiMenu gui = xaGui.createMenu("Example GUI", 3);
gui.setOnPageSwitch((data) -> {
data.getPlayer().sendMessage("You switched to page " + data.getPage() + " from page " + data.getOldPage());
});
gui.setOnOpen((event) -> {
event.getPlayer().sendMessage("You opened the GUI!");
});
gui.setOnClose((event) -> {
event.getPlayer().sendMessage("You closed the GUI!");
});
gui.setOnClick((event) -> {
event.getWhoClicked().sendMessage("You clicked on slot " + event.getSlot());
});