NichtStudioCode / InvUI

A spigot library for creating custom inventory-based GUIs.
MIT License
242 stars 19 forks source link

Is it anyway to check a player is opening InvUI's inventory(Gui) ? #35

Closed zvyap closed 1 year ago

zvyap commented 1 year ago

Im wonder is it anyway to check a player is opening InvUI's Gui? Or I just need to loop all Windows and check the viewer

Can you consider to add a custom bukkit inventory holder to the bukkit's inventory? So we can inventory.getHolder() instanceof XXXXXX to check wheather player is opening the Gui

NichtStudioCode commented 1 year ago

Im wonder is it anyway to check a player is opening InvUI's Gui?

No, but you can register an open handler on a Window.
You can also use the WindowManager to get the currently open window.

Can you consider to add a custom bukkit inventory holder to the bukkit's inventory?

I'll look into it