Suggestion: Run command when shopkeeper UI is closed
m4kii420 opened this issue ยท 2 comments
Hi, I suggest adding an option to add a console or player command that will run when the player closes a specific Shopkeeper.
With this, we could make a GUI with a plugin like DeluxeMenus where they would be able to open shopkeeper menus, and when they exit it, they will autorun for example /shop
command which will get them back to shop menu.
I don't know if is this doable but if it is it would be very helpful.
Also sorry for using the "issues" section, idk where else to send this.
If you are a programmer, this can already be achieved via the usual Bukkit API (InventoryCloseEvent + checking what kind of inventory was closed, what inventory / GUI was open earlier, etc.). Maybe there are also scripting plugins that allow you to react to this event without you having to write a full-fleged plugin, but you would have to look into this yourself (for example, maybe this can be achieved with Denizens: https://guide.denizenscript.com/guides/first-steps/world-script.html, https://meta.denizenscript.com/Docs/Events/#player%20closes%20inventory)
I currently don't intend to provide a command hook for this UI closing event.