PaginatedGUI
Option 1: Object
// Create the object with title and size
PaginatedGUI pg = new PagiantedGUI(new GUI("Hidden Veggie", Rows.SIX));
// Show a cute fruit and a hidden veggie
pg.setItem(0, new Item(Material.APPLE));
pg.setItem(69, new Item(Material.CARROT);
// Render visible slots
pg.draw();
// Open the inventory for a Player
pg.openInventory(player);Option 2: Extended Class
public class MyCustomGUI extends PaginatedGUI {
public MyCustomGUI() {
super(new GUI("Hidden Vegetable"), Rows.SIX);
// Show a cute fruit or hidden veggie
for (int i=0; i<69; i++){
Item item;
if (i < 42) {
item = new Item(Material.APPLE);
} else {
item = new Item("CARROT");
item.setDisplayName("Secret To All");
}
setItem(i, item);
}
// Render visible slots
draw();
}
}
// Call #openInventory from another class or listenerLast updated