Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not allow the GUI to be closed #42

Open
Phoenix616 opened this issue Nov 20, 2022 · 3 comments
Open

Option to not allow the GUI to be closed #42

Phoenix616 opened this issue Nov 20, 2022 · 3 comments

Comments

@Phoenix616
Copy link
Owner

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)

@Danieljunek17
Copy link

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

@Phoenix616
Copy link
Owner Author

Phoenix616 commented Jan 6, 2023

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.

@Danieljunek17
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants