GlowstoneMC/Glowstone — pull request #274 by dequis (2014-09-13 09:02:02+00:00)
Title: Don't return null in PlayerInventory.getItemInHand()

Fixes #265 - see that ticket for more details.

Apparently getItemInHand() is the only method that needs to return
ItemStack{AIR x 0} instead of null, and plugins expect it to be like
this, and get NPEs without this patch.

Other methods (getItem, getContents, getBoots, etc) return null instead,
this one is the exception for reasons we'll never know since the source
of craftbukkit is gone. Forever.