Fix ArrayIndexOOBException. Fixes BUKKIT-3938