InventoryGui icon indicating copy to clipboard operation
InventoryGui copied to clipboard

Option to not allow the GUI to be closed

Open Phoenix616 opened this issue 3 years ago • 3 comments

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)

Phoenix616 avatar Nov 20 '22 22:11 Phoenix616

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

Danieljunek17 avatar Jan 06 '23 12:01 Danieljunek17

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.

Phoenix616 avatar Jan 06 '23 13:01 Phoenix616

thanks for the replying this quick, I knew you can't cancel closing but reopening is indeed the only option

Danieljunek17 avatar Jan 06 '23 13:01 Danieljunek17