https://github.com/Bukkit/CraftBukkit/pull/1154/files#r6367256