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

Add a method to make the gui not closeable by client #59

Closed
ImFound opened this issue Mar 5, 2022 · 7 comments
Closed

Add a method to make the gui not closeable by client #59

ImFound opened this issue Mar 5, 2022 · 7 comments

Comments

@ImFound
Copy link

ImFound commented Mar 5, 2022

It would be nice to make a method that does not allow the client to close the gui, until the plugin closes it.

@iGabyTM
Copy link
Member

iGabyTM commented Mar 5, 2022

I don't think that's very do-able, afaik there's no way to check if the inventory was closed by a player or plugin.

@ImFound
Copy link
Author

ImFound commented Mar 5, 2022

immagine
are u sure?

@BlitzOffline
Copy link
Contributor

Pretty sure that's a paper only thing.

@ImFound
Copy link
Author

ImFound commented Mar 5, 2022

umhh now I check

@BlitzOffline
Copy link
Contributor

I did check. It is.
image
image

First is spigot, second is paper.

@iGabyTM
Copy link
Member

iGabyTM commented Mar 5, 2022

You can implement that on your end though

/**
* Sets the {@link GuiAction} to run once the inventory is closed.
* See {@link InventoryCloseEvent}.
*
* @param closeGuiAction {@link GuiAction} to resolve when the inventory is closed.
*/
public void setCloseGuiAction(@Nullable final GuiAction<@NotNull InventoryCloseEvent> closeGuiAction) {
this.closeGuiAction = closeGuiAction;
}

@ImFound
Copy link
Author

ImFound commented Mar 5, 2022

oh okay, thanks

@ImFound ImFound closed this as completed Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants