Question about inventory GUI click detection.

Another question related to the GUI: How do I detect clicks inside the inventory? This is for a vanilla map.
Continue to help post