Buttons
In this page you can see how to create a button into your GUI
// Create the gui with only a line
McGUI gui = new McGUI("§7Name", GuiLines.ONE_LINE, Main.getInstance());
// Create the item
GUItem item = new GUICustomItem(Material.BARRIER);
item.setName("§fClose");
// Create the button at the middle of the gui (5 - 1)
gui.createButton(item, 4, new GUIButtonEvents(() -> {
// put here all the actions for when you interact with the button
}));// Create the button at the middle of the gui (5 - 1)
gui.createButton(item, 4, new GUIButtonEvents(() -> {
// Left click actions
}, () -> { /* Right click actions */}));Last updated