NichtStudioCode/InvUI

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

Closed this issue · 1 comments

zvyap commented

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

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