[Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305

Applied patch Bukkit/CraftBukkit@80e069d9d556e59771f6a7d0fb6050dcf6c86f06