To create a persistent GUI all you need to do is:
// Main constructorPersistentGui persistentGui = new PersistentGui(3, "GUI Title");// AlternativePersistentGui persistentGui = new PersistentGui("GUI Title");
Just like the normal GUI the first parameter is the rows the GUI should have.
Differently to the normal GUI, the addItem
method takes an ItemStack
instead. Any GuiItem
added will have actions applied to it, the persistent items are simple ItemStacks that have nothing associated to it.