Sorry for the late response, but originally I wanted to test if the GuiContainer contained a particular item, e.g. diamond, and if it's true, alert the player. The rest can be settled later, the main issue is the deriving of the container's items.
I've tried additional things like Thread.sleep, which just hangs the client and doesn't actually affect the result. I've also tried tried TickEvent.ClientTickEvent, however even when the container is opened for a few seconds, it doesn't register the items at all for some reason...
Any advice?