So 1.8 brought the ability to test for whatever the player currently has selected. For example (maybe not exactly, but something like this),