InventoryGui
InventoryGui copied to clipboard
Option to not allow the GUI to be closed
Add an option so that the GUI cannot be closed by the player, only via the library functions itself.
Will most likely need to reopen the GUI as there (currently) is no way to stop the closing server-side.
(Current way of implementing this would be via the GUI close handler but having an option could be nice)
Well I would like to use it but for 1 of the projects I use this is a neccesity and It's sad it isn't implement yet, is there any ETA for when this feature would be implemented
No ETA seeing as the same functionality can already be achieved by simply reopening the GUI in a close handler e.g. with
gui.setCloseAction(close -> {
close.getGui().show(close.getPlayer()));
return false;
}
An option would essentially just be doing the same thing as you can't prevent the client from closing a specific inventory anyways. You can only reopen the previous one.
thanks for the replying this quick, I knew you can't cancel closing but reopening is indeed the only option