#Detecting when a player is no longer viewing an inventory?

1 messages · Page 1 of 1 (latest)

dreamy horizon
#

Hey guys!

I'm working with some GUI menus here, and I want to detect when a player is no longer viewing any inventory.

Using InventoryCloseEvent doesn't work, because that's called when a new inventory is opened (hence closing the old inventory). I need to specifically detect if the player has closed the inventory and did not open a new one. Other than running a timer and checking, is there some other way?

Thanks! :D

brisk lance
#

You could probably use a combination of inventory open and close events to make this happen