IF
IF copied to clipboard
All ChestGuis appear empty until Gui#update method is called
Again this happened after updating from 0.11.3 to 0.11.6-SNAPSHOT. Let me know if this breaking change was intentional.
This wouldn't be intentional, but I seem to be unable to reproduce this issue. Could you perhaps share some code with which this bug occurs?
ChestGui gui = new ChestGui(3, ComponentHolder.of(text("Cosmetics", DARK_GREEN)));
StaticPane pane = new StaticPane(9, 3);
GuiItem item = new GuiItem(new ItemBuilder(Material.BARRIER).name("<red>You don't have any cosmetics").build(), event -> {
pane.addItem(new GuiItem(new ItemBuilder(event.getCurrentItem()).name("<red>Jokes on you! Cosmetics aren't even implemented yet.").build()), 4, 0);
gui.update();
});
pane.addItem(item, 4, 0);
pane.addItem(new GuiItem(new ItemBuilder(Material.BOOK).name("<dark_red>Close").build(), event -> event.getWhoClicked().closeInventory()), 4, 2);
gui.addPane(pane);
gui.setOnGlobalClick(event -> event.setCancelled(true));
if(!gui.getViewers().contains(p))
gui.show(p);